rocprofiler-sdk/buffer_tracing.h Source File

rocprofiler-sdk/buffer_tracing.h Source File#

Rocprofiler SDK Developer API: rocprofiler-sdk/buffer_tracing.h Source File
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
buffer_tracing.h
Go to the documentation of this file.
1// MIT License
2//
3// Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All rights reserved.
4//
5// Permission is hereby granted, free of charge, to any person obtaining a copy
6// of this software and associated documentation files (the "Software"), to deal
7// in the Software without restriction, including without limitation the rights
8// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9// copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in all
13// copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21// SOFTWARE.
22
23#pragma once
24
27#include <rocprofiler-sdk/fwd.h>
29
30#include <stdint.h>
31
32ROCPROFILER_EXTERN_C_INIT
33
34/**
35 * @defgroup BUFFER_TRACING_SERVICE Asynchronous Tracing Service
36 * @brief Receive callbacks for batches of records from an internal (background) thread
37 *
38 * @{
39 */
40
41/**
42 * @brief ROCProfiler Buffer HSA API Tracer Record.
43 */
44typedef struct
45{
46 uint64_t size; ///< size of this struct
49 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
50 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
51 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
52 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
53
54 /// @var kind
55 /// @brief ::ROCPROFILER_CALLBACK_TRACING_HSA_CORE_API,
56 /// ::ROCPROFILER_CALLBACK_TRACING_HSA_AMD_EXT_API,
57 /// ::ROCPROFILER_CALLBACK_TRACING_HSA_IMAGE_EXT_API, or
58 /// ::ROCPROFILER_CALLBACK_TRACING_HSA_FINALIZE_EXT_API
59 /// @var operation
60 /// @brief Specification of the API function, e.g., ::rocprofiler_hsa_core_api_id_t,
61 /// ::rocprofiler_hsa_amd_ext_api_id_t, ::rocprofiler_hsa_image_ext_api_id_t, or
62 /// ::rocprofiler_hsa_finalize_ext_api_id_t
64
65/**
66 * @brief ROCProfiler Buffer HIP API Tracer Record.
67 */
68typedef struct
69{
70 uint64_t size; ///< size of this struct
73 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
74 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
75 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
76 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
77
78 /// @var kind
79 /// @brief ::ROCPROFILER_CALLBACK_TRACING_HIP_RUNTIME_API or
80 /// ::ROCPROFILER_CALLBACK_TRACING_HIP_COMPILER_API
81 /// @var operation
82 /// @brief Specification of the API function, e.g., ::rocprofiler_hip_runtime_api_id_t or
83 /// ::rocprofiler_hip_compiler_api_id_t
85
86/**
87 * @brief Additional trace data for OMPT target routines
88 */
89
91{
92 int32_t kind; // ompt_target_t target region kind
93 int32_t device_num; // ompt device number for the region
94 uint64_t task_id; // Task ID from the task_data argument to the OMPT callback
95 uint64_t target_id; // Target identifier from the target_data argument to the callback
96 const void* codeptr_ra; // pointer to the callsite of the target region
98
100{
101 uint64_t host_op_id; // from the host_op_id argument to the OMPT callback
102 int32_t optype; // ompt_target_data_op_t kind of operation
103 int32_t src_device_num; // ompt device number for data source
104 int32_t dst_device_num; // ompt device number for data destination
105 int32_t reserved; // for padding
106 uint64_t bytes; // size in bytes of the operation
107 const void* codeptr_ra; // pointer to the callsite of the target_data_op
109
111{
112 uint64_t host_op_id; // from the host_op_id argument to the OMPT callback
113 int32_t device_num; // strangely missing from the OpenMP spec,
114 uint32_t requested_num_teams; // from the compiler
116
117/**
118 * @brief ROCProfiler Buffer OMPT Tracer Record.
119 */
121{
122 uint64_t size; ///< size of this struct
125 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
126 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
127 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
128 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
129 union
130 {
134 uint64_t reserved[5];
135 };
136
137 /// @var kind
138 /// @brief ::ROCPROFILER_BUFFER_TRACING_OMPT
139 /// @var operation
140 /// @brief Specification of the ::rocprofiler_ompt_operation_t
142
143/**
144 * @brief ROCProfiler Buffer Marker Tracer Record.
145 */
146typedef struct
147{
148 uint64_t size; ///< size of this struct
151 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
152 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
153 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
154 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
155
156 /// @var kind
157 /// @brief ::ROCPROFILER_CALLBACK_TRACING_MARKER_CORE_API,
158 /// ::ROCPROFILER_CALLBACK_TRACING_MARKER_CONTROL_API, or
159 /// ::ROCPROFILER_CALLBACK_TRACING_MARKER_NAME_API
160 /// @var operation
161 /// @brief Specification of the API function, e.g., ::rocprofiler_marker_core_api_id_t,
162 /// ::rocprofiler_marker_control_api_id_t, or
163 /// ::rocprofiler_marker_name_api_id_t
165
166/**
167 * @brief ROCProfiler Buffer RCCL API Record.
168 */
169typedef struct
170{
171 uint64_t size; ///< size of this struct
174 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
175 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
176 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
177 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
178
179 /// @var kind
180 /// @brief ::ROCPROFILER_CALLBACK_TRACING_RCCL_API
181 /// @var operation
182 /// @brief Specification of the API function, e.g., ::rocprofiler_rccl_api_id_t
184
185/**
186 * @brief ROCProfiler Buffer ROCDecode API Record.
187 */
188typedef struct
189{
190 uint64_t size; ///< size of this struct
193 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
194 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
195 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
196 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
197
198 /// @var kind
199 /// @brief ::ROCPROFILER_CALLBACK_TRACING_ROCDECODE_API
200 /// @var operation
201 /// @brief Specification of the API function, e.g., ::rocprofiler_rocdecode_api_id_t
203
204/**
205 * @brief ROCProfiler Buffer Memory Copy Tracer Record.
206 */
207typedef struct
208{
209 uint64_t size; ///< size of this struct
212 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
213 rocprofiler_thread_id_t thread_id; ///< id for thread that triggered copy
214 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
215 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
216 rocprofiler_agent_id_t dst_agent_id; ///< destination agent of copy
217 rocprofiler_agent_id_t src_agent_id; ///< source agent of copy
218 uint64_t bytes; ///< bytes copied
219
220 /// @var kind
221 /// @brief ::ROCPROFILER_BUFFER_TRACING_MEMORY_COPY
222 /// @var operation
223 /// @brief Specification of the memory copy direction (@see
224 /// ::rocprofiler_memory_copy_operation_t)
226
227/**
228 * @brief ROCProfiler Buffer Memory Allocation Tracer Record.
229 */
230typedef struct
231{
232 uint64_t size; ///< size of this struct
235 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
236 rocprofiler_thread_id_t thread_id; ///< id for thread that triggered copy
237 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
238 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
239 rocprofiler_agent_id_t agent_id; ///< agent information for memory allocation
240 rocprofiler_address_t address; ///< starting address for memory allocation
241 uint64_t allocation_size; ///< size for memory allocation
242 /// @var kind
243 /// @brief ::ROCPROFILER_BUFFER_TRACING_MEMORY_ALLOCATION
244 /// @var operation
245 /// @brief Specification of the memory allocation function (@see
246 /// ::rocprofiler_memory_allocation_operation_t
248
249/**
250 * @brief ROCProfiler Buffer Kernel Dispatch Tracer Record.
251 */
253{
254 uint64_t size; ///< size of this struct
255 rocprofiler_buffer_tracing_kind_t kind; ///< ::ROCPROFILER_BUFFER_TRACING_KERNEL_DISPATCH
257 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
258 rocprofiler_thread_id_t thread_id; ///< id for thread that launched kernel
259 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
260 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
262
263 /// @var operation
264 /// @brief Kernel dispatch buffer records only report the ::ROCPROFILER_KERNEL_DISPATCH_COMPLETE
265 /// operation because there are no "real" wrapper around the enqueuing of an individual kernel
266 /// dispatch
268
269/**
270 * @brief ROCProfiler Buffer Page Migration Tracer Record
271 */
281
282/**
283 * @brief ROCProfiler Buffer Scratch Memory Tracer Record
284 */
285typedef struct
286{
287 uint64_t size; ///< size of this struct
288 rocprofiler_buffer_tracing_kind_t kind; ///< ::ROCPROFILER_BUFFER_TRACING_SCRATCH_MEMORY
289 rocprofiler_scratch_memory_operation_t operation; ///< specification of the kind
290 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
291 rocprofiler_agent_id_t agent_id; ///< agent kernel was dispatched on
292 rocprofiler_queue_id_t queue_id; ///< queue kernel was dispatched on
293 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
294 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
295 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
298
299/**
300 * @brief ROCProfiler Buffer Correlation ID Retirement Tracer Record.
301 */
302typedef struct
303{
304 uint64_t size; ///< size of this struct
308
309 /// @var kind
310 /// @brief ::ROCPROFILER_BUFFER_TRACING_CORRELATION_ID_RETIREMENT
311 /// @var timestamp
312 /// @brief Timestamp (in nanosec) of when rocprofiler detected the correlation ID could be
313 /// retired. Due to clock skew between the CPU and GPU, this may at times, *appear* to be before
314 /// the kernel or memory copy completed but the reality is that if this ever occurred, the API
315 /// would report a FATAL error
316 /// @var internal_correlation_id
317 /// @brief Only internal correlation ID is provided
319
320/**
321 * @brief ROCProfiler Buffer Runtime Initialization Tracer Record.
322 */
324{
325 uint64_t size; ///< size of this struct
331 uint64_t version;
332 uint64_t instance;
333
334 /// @var kind
335 /// @brief ::ROCPROFILER_BUFFER_TRACING_RUNTIME_INITIALIZATION
336 /// @var operation
337 /// @brief Indicates which runtime was initialized/loaded
338 /// @var correlation_id
339 /// @brief Correlation ID for these records are always zero
340 /// @var thread_id
341 /// @brief ID for thread which loaded this runtime
342 /// @var timestamp
343 /// @brief Timestamp (in nanosec) of when runtime was initialized/loaded
344 /// @var version
345 /// @brief The version number of the runtime
346 ///
347 /// Version number is encoded as: (10000 * MAJOR) + (100 * MINOR) + PATCH
348 /// @var instance
349 /// @brief Number of times this runtime had been loaded previously
351
352/**
353 * @brief Callback function for mapping @ref rocprofiler_buffer_tracing_kind_t ids to
354 * string names. @see rocprofiler_iterate_buffer_trace_kind_names.
355 */
357 void* data);
358
359/**
360 * @brief Callback function for mapping the operations of a given @ref
361 * rocprofiler_buffer_tracing_kind_t to string names. @see
362 * rocprofiler_iterate_buffer_trace_kind_operation_names.
363 */
367 void* data);
368
369/**
370 * @brief Configure Buffer Tracing Service.
371 *
372 * @param [in] context_id Associated context to control activation of service
373 * @param [in] kind Buffer tracing category
374 * @param [in] operations Array of specific operations (if desired)
375 * @param [in] operations_count Number of specific operations (if non-null set of operations)
376 * @param [in] buffer_id Buffer to store the records in
377 * @return ::rocprofiler_status_t
378 * @retval ::ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED ::rocprofiler_configure initialization
379 * phase has passed
380 * @retval ::ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND context is not valid
381 * @retval ::ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED Context has already been configured
382 * for the ::rocprofiler_buffer_tracing_kind_t kind
383 * @retval ::ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND Invalid ::rocprofiler_buffer_tracing_kind_t
384 * @retval ::ROCPROFILER_STATUS_ERROR_OPERATION_NOT_FOUND Invalid operation id for
385 * ::rocprofiler_buffer_tracing_kind_t kind was found
386 *
387 */
391 const rocprofiler_tracing_operation_t* operations,
392 size_t operations_count,
393 rocprofiler_buffer_id_t buffer_id) ROCPROFILER_API;
394
395/**
396 * @brief Query the name of the buffer tracing kind. The name retrieved from this function is a
397 * string literal that is encoded in the read-only section of the binary (i.e. it is always
398 * "allocated" and never "deallocated").
399 *
400 * @param [in] kind Buffer tracing domain
401 * @param [out] name If non-null and the name is a constant string that does not require dynamic
402 * allocation, this paramter will be set to the address of the string literal, otherwise it will
403 * be set to nullptr
404 * @param [out] name_len If non-null, this will be assigned the length of the name (regardless of
405 * the name is a constant string or requires dynamic allocation)
406 * @return ::rocprofiler_status_t
407 * @retval ::ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND Returned if the domain id is not valid
408 * @retval ::ROCPROFILER_STATUS_SUCCESS Returned if a valid domain, regardless if there is a
409 * constant string or not.
410 */
413 const char** name,
414 uint64_t* name_len) ROCPROFILER_API;
415
416/**
417 * @brief Query the name of the buffer tracing kind. The name retrieved from this function is a
418 * string literal that is encoded in the read-only section of the binary (i.e. it is always
419 * "allocated" and never "deallocated").
420 *
421 * @param [in] kind Buffer tracing domain
422 * @param [in] operation Enumeration id value which maps to a specific API function or event type
423 * @param [out] name If non-null and the name is a constant string that does not require dynamic
424 * allocation, this paramter will be set to the address of the string literal, otherwise it will
425 * be set to nullptr
426 * @param [out] name_len If non-null, this will be assigned the length of the name (regardless of
427 * the name is a constant string or requires dynamic allocation)
428 * @return ::rocprofiler_status_t
429 * @retval ::ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND An invalid domain id
430 * @retval ::ROCPROFILER_STATUS_ERROR_OPERATION_NOT_FOUND The operation number is not recognized for
431 * the given domain
432 * @retval ::ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED Rocprofiler does not support providing the
433 * operation name within this domain
434 * @retval ::ROCPROFILER_STATUS_SUCCESS Valid domain and operation, regardless of whether there is a
435 * constant string or not.
436 */
440 const char** name,
441 uint64_t* name_len) ROCPROFILER_API;
442
443/**
444 * @brief Iterate over all the buffer tracing kinds and invokes the callback for each buffer tracing
445 * kind.
446 *
447 * This is typically used to invoke ::rocprofiler_iterate_buffer_tracing_kind_operations for each
448 * buffer tracing kind.
449 *
450 * @param [in] callback Callback function invoked for each enumeration value in @ref
451 * rocprofiler_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
452 * @param [in] data User data passed back into the callback
453 */
456 void* data) ROCPROFILER_API ROCPROFILER_NONNULL(1);
457
458/**
459 * @brief Iterates over all the operations for a given @ref
460 * rocprofiler_buffer_tracing_kind_t and invokes the callback with the kind and operation
461 * id. This is useful to build a map of the operation names during tool initialization instead of
462 * querying rocprofiler everytime in the callback hotpath.
463 *
464 * @param [in] kind which buffer tracing kind operations to iterate over
465 * @param [in] callback Callback function invoked for each operation associated with @ref
466 * rocprofiler_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
467 * @param [in] data User data passed back into the callback
468 */
473 void* data) ROCPROFILER_API ROCPROFILER_NONNULL(2);
474
475/** @} */
476
477ROCPROFILER_EXTERN_C_FINI
int32_t rocprofiler_tracing_operation_t
Tracing Operation ID. Depending on the kind, operations can be determined. If the value is equal to z...
Definition fwd.h:481
rocprofiler_scratch_memory_operation_t
Scratch event kind.
Definition fwd.h:354
rocprofiler_page_migration_operation_t
Page migration event.
Definition fwd.h:337
rocprofiler_memory_copy_operation_t
Memory Copy Operations.
Definition fwd.h:231
rocprofiler_runtime_initialization_operation_t
ROCProfiler Runtime Initialization Tracer Operations.
Definition fwd.h:398
rocprofiler_memory_allocation_operation_t
Memory Allocation Operation.
Definition fwd.h:244
rocprofiler_status_t
Status codes.
Definition fwd.h:53
uint64_t rocprofiler_thread_id_t
Thread ID. Value will be equivalent to syscall(__NR_gettid)
Definition fwd.h:472
rocprofiler_buffer_tracing_kind_t
Service Buffer Tracing Kind.
Definition fwd.h:187
rocprofiler_kernel_dispatch_operation_t
ROCProfiler Kernel Dispatch Tracing Operation Types.
Definition fwd.h:257
uint64_t rocprofiler_timestamp_t
ROCProfiler Timestamp.
Definition fwd.h:467
Agent Identifier.
Definition fwd.h:594
Context ID.
Definition fwd.h:555
ROCProfiler Record Correlation ID.
Definition fwd.h:571
ROCProfiler kernel dispatch information.
Definition fwd.h:706
Stores memory address for profiling.
Definition fwd.h:530
rocprofiler_tracing_operation_t operation
Specification of the API function, e.g., rocprofiler_rccl_api_id_t.
rocprofiler_thread_id_t thread_id
id for thread that launched kernel
rocprofiler_thread_id_t thread_id
id for thread generating this record
rocprofiler_thread_id_t thread_id
id for thread generating this record
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_CALLBACK_TRACING_MARKER_CORE_API, ROCPROFILER_CALLBACK_TRACING_MARKER_CONTROL_API,...
rocprofiler_thread_id_t thread_id
ID for thread which loaded this runtime.
rocprofiler_thread_id_t thread_id
id for thread generating this record
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_tracing_operation_t operation
Specification of the rocprofiler_ompt_operation_t.
rocprofiler_timestamp_t timestamp
Timestamp (in nanosec) of when rocprofiler detected the correlation ID could be retired....
uint64_t instance
Number of times this runtime had been loaded previously.
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_memory_allocation_operation_t operation
Specification of the memory allocation function (.
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_agent_id_t dst_agent_id
destination agent of copy
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_SCRATCH_MEMORY
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_thread_id_t thread_id
id for thread that triggered copy
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_thread_id_t thread_id
id for thread that triggered copy
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_agent_id_t agent_id
agent information for memory allocation
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_tracing_operation_t operation
Specification of the API function, e.g., rocprofiler_rocdecode_api_id_t.
rocprofiler_agent_id_t agent_id
agent kernel was dispatched on
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_agent_id_t src_agent_id
source agent of copy
uint64_t version
The version number of the runtime.
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_thread_id_t thread_id
id for thread generating this record
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_RUNTIME_INITIALIZATION
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_address_t address
starting address for memory allocation
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_CALLBACK_TRACING_HSA_CORE_API, ROCPROFILER_CALLBACK_TRACING_HSA_AMD_EXT_API,...
rocprofiler_timestamp_t timestamp
Timestamp (in nanosec) of when runtime was initialized/loaded.
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_CORRELATION_ID_RETIREMENT
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_CALLBACK_TRACING_RCCL_API
rocprofiler_tracing_operation_t operation
Specification of the API function, e.g., rocprofiler_hsa_core_api_id_t, rocprofiler_hsa_amd_ext_api_i...
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_timestamp_t timestamp
start time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_KERNEL_DISPATCH
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_CALLBACK_TRACING_ROCDECODE_API
rocprofiler_correlation_id_t correlation_id
Correlation ID for these records are always zero.
rocprofiler_runtime_initialization_operation_t operation
Indicates which runtime was initialized/loaded.
rocprofiler_kernel_dispatch_operation_t operation
Kernel dispatch buffer records only report the ROCPROFILER_KERNEL_DISPATCH_COMPLETE operation because...
rocprofiler_scratch_memory_operation_t operation
specification of the kind
rocprofiler_memory_copy_operation_t operation
Specification of the memory copy direction (.
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_thread_id_t thread_id
id for thread generating this record
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_CALLBACK_TRACING_HIP_RUNTIME_API or ROCPROFILER_CALLBACK_TRACING_HIP_COMPILER_API
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_PAGE_MIGRATION.
rocprofiler_tracing_operation_t operation
Specification of the API function, e.g., rocprofiler_marker_core_api_id_t, rocprofiler_marker_control...
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_thread_id_t thread_id
id for thread generating this record
rocprofiler_thread_id_t thread_id
id for thread generating this record
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_kernel_dispatch_info_t dispatch_info
Dispatch info.
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_correlation_id_t correlation_id
correlation ids for record
rocprofiler_timestamp_t start_timestamp
start time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_MEMORY_COPY
rocprofiler_queue_id_t queue_id
queue kernel was dispatched on
rocprofiler_page_migration_operation_t operation
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_OMPT
rocprofiler_timestamp_t end_timestamp
end time in nanoseconds
rocprofiler_tracing_operation_t operation
Specification of the API function, e.g., rocprofiler_hip_runtime_api_id_t or rocprofiler_hip_compiler...
uint64_t internal_correlation_id
Only internal correlation ID is provided.
int(* rocprofiler_buffer_tracing_kind_operation_cb_t)(rocprofiler_buffer_tracing_kind_t kind, rocprofiler_tracing_operation_t operation, void *data)
Callback function for mapping the operations of a given rocprofiler_buffer_tracing_kind_t to string n...
rocprofiler_status_t rocprofiler_iterate_buffer_tracing_kinds(rocprofiler_buffer_tracing_kind_cb_t callback, void *data)
Iterate over all the buffer tracing kinds and invokes the callback for each buffer tracing kind.
int(* rocprofiler_buffer_tracing_kind_cb_t)(rocprofiler_buffer_tracing_kind_t kind, void *data)
Callback function for mapping rocprofiler_buffer_tracing_kind_t ids to string names.
rocprofiler_status_t rocprofiler_configure_buffer_tracing_service(rocprofiler_context_id_t context_id, rocprofiler_buffer_tracing_kind_t kind, const rocprofiler_tracing_operation_t *operations, unsigned long operations_count, rocprofiler_buffer_id_t buffer_id)
Configure Buffer Tracing Service.
rocprofiler_status_t rocprofiler_query_buffer_tracing_kind_name(rocprofiler_buffer_tracing_kind_t kind, const char **name, uint64_t *name_len)
Query the name of the buffer tracing kind. The name retrieved from this function is a string literal ...
rocprofiler_status_t rocprofiler_query_buffer_tracing_kind_operation_name(rocprofiler_buffer_tracing_kind_t kind, rocprofiler_tracing_operation_t operation, const char **name, uint64_t *name_len)
Query the name of the buffer tracing kind. The name retrieved from this function is a string literal ...
rocprofiler_status_t rocprofiler_iterate_buffer_tracing_kind_operations(rocprofiler_buffer_tracing_kind_t kind, rocprofiler_buffer_tracing_kind_operation_cb_t callback, void *data)
Iterates over all the operations for a given rocprofiler_buffer_tracing_kind_t and invokes the callba...
ROCProfiler Buffer Correlation ID Retirement Tracer Record.
ROCProfiler Buffer HIP API Tracer Record.
ROCProfiler Buffer HSA API Tracer Record.
ROCProfiler Buffer Kernel Dispatch Tracer Record.
ROCProfiler Buffer Marker Tracer Record.
ROCProfiler Buffer Memory Allocation Tracer Record.
ROCProfiler Buffer Memory Copy Tracer Record.
ROCProfiler Buffer OMPT Tracer Record.
Additional trace data for OMPT target routines.
ROCProfiler Buffer Page Migration Tracer Record.
ROCProfiler Buffer RCCL API Record.
ROCProfiler Buffer ROCDecode API Record.
ROCProfiler Buffer Runtime Initialization Tracer Record.
ROCProfiler Buffer Scratch Memory Tracer Record.
rocprofiler_scratch_alloc_flag_t
Allocation flags for.