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 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 Memory Copy Tracer 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_thread_id_t thread_id; ///< id for thread that triggered copy
195 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
196 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
197 rocprofiler_agent_id_t dst_agent_id; ///< destination agent of copy
198 rocprofiler_agent_id_t src_agent_id; ///< source agent of copy
199 uint64_t bytes; ///< bytes copied
200
201 /// @var kind
202 /// @brief ::ROCPROFILER_BUFFER_TRACING_MEMORY_COPY
203 /// @var operation
204 /// @brief Specification of the memory copy direction (@see
205 /// ::rocprofiler_memory_copy_operation_t)
207
208/**
209 * @brief ROCProfiler Buffer Memory Allocation Tracer Record.
210 */
211typedef struct
212{
213 uint64_t size; ///< size of this struct
216 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
217 rocprofiler_thread_id_t thread_id; ///< id for thread that triggered copy
218 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
219 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
220 rocprofiler_agent_id_t agent_id; ///< agent information for memory allocation
221 rocprofiler_address_t address; ///< starting address for memory allocation
222 uint64_t allocation_size; ///< size for memory allocation
223 /// @var kind
224 /// @brief ::ROCPROFILER_BUFFER_TRACING_MEMORY_ALLOCATION
225 /// @var operation
226 /// @brief Specification of the memory allocation function (@see
227 /// ::rocprofiler_memory_allocation_operation_t
229
230/**
231 * @brief ROCProfiler Buffer Kernel Dispatch Tracer Record.
232 */
234{
235 uint64_t size; ///< size of this struct
236 rocprofiler_buffer_tracing_kind_t kind; ///< ::ROCPROFILER_BUFFER_TRACING_KERNEL_DISPATCH
238 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
239 rocprofiler_thread_id_t thread_id; ///< id for thread that launched kernel
240 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
241 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
243
244 /// @var operation
245 /// @brief Kernel dispatch buffer records only report the ::ROCPROFILER_KERNEL_DISPATCH_COMPLETE
246 /// operation because there are no "real" wrapper around the enqueuing of an individual kernel
247 /// dispatch
249
250/**
251 * @brief ROCProfiler Buffer Page Migration Tracer Record
252 */
262
263/**
264 * @brief ROCProfiler Buffer Scratch Memory Tracer Record
265 */
266typedef struct
267{
268 uint64_t size; ///< size of this struct
269 rocprofiler_buffer_tracing_kind_t kind; ///< ::ROCPROFILER_BUFFER_TRACING_SCRATCH_MEMORY
270 rocprofiler_scratch_memory_operation_t operation; ///< specification of the kind
271 rocprofiler_correlation_id_t correlation_id; ///< correlation ids for record
272 rocprofiler_agent_id_t agent_id; ///< agent kernel was dispatched on
273 rocprofiler_queue_id_t queue_id; ///< queue kernel was dispatched on
274 rocprofiler_thread_id_t thread_id; ///< id for thread generating this record
275 rocprofiler_timestamp_t start_timestamp; ///< start time in nanoseconds
276 rocprofiler_timestamp_t end_timestamp; ///< end time in nanoseconds
279
280/**
281 * @brief ROCProfiler Buffer Correlation ID Retirement Tracer Record.
282 */
283typedef struct
284{
285 uint64_t size; ///< size of this struct
289
290 /// @var kind
291 /// @brief ::ROCPROFILER_BUFFER_TRACING_CORRELATION_ID_RETIREMENT
292 /// @var timestamp
293 /// @brief Timestamp (in nanosec) of when rocprofiler detected the correlation ID could be
294 /// retired. Due to clock skew between the CPU and GPU, this may at times, *appear* to be before
295 /// the kernel or memory copy completed but the reality is that if this ever occurred, the API
296 /// would report a FATAL error
297 /// @var internal_correlation_id
298 /// @brief Only internal correlation ID is provided
300
301/**
302 * @brief ROCProfiler Buffer Runtime Initialization Tracer Record.
303 */
305{
306 uint64_t size; ///< size of this struct
312 uint64_t version;
313 uint64_t instance;
314
315 /// @var kind
316 /// @brief ::ROCPROFILER_BUFFER_TRACING_RUNTIME_INITIALIZATION
317 /// @var operation
318 /// @brief Indicates which runtime was initialized/loaded
319 /// @var correlation_id
320 /// @brief Correlation ID for these records are always zero
321 /// @var thread_id
322 /// @brief ID for thread which loaded this runtime
323 /// @var timestamp
324 /// @brief Timestamp (in nanosec) of when runtime was initialized/loaded
325 /// @var version
326 /// @brief The version number of the runtime
327 ///
328 /// Version number is encoded as: (10000 * MAJOR) + (100 * MINOR) + PATCH
329 /// @var instance
330 /// @brief Number of times this runtime had been loaded previously
332
333/**
334 * @brief Callback function for mapping @ref rocprofiler_buffer_tracing_kind_t ids to
335 * string names. @see rocprofiler_iterate_buffer_trace_kind_names.
336 */
338 void* data);
339
340/**
341 * @brief Callback function for mapping the operations of a given @ref
342 * rocprofiler_buffer_tracing_kind_t to string names. @see
343 * rocprofiler_iterate_buffer_trace_kind_operation_names.
344 */
348 void* data);
349
350/**
351 * @brief Configure Buffer Tracing Service.
352 *
353 * @param [in] context_id Associated context to control activation of service
354 * @param [in] kind Buffer tracing category
355 * @param [in] operations Array of specific operations (if desired)
356 * @param [in] operations_count Number of specific operations (if non-null set of operations)
357 * @param [in] buffer_id Buffer to store the records in
358 * @return ::rocprofiler_status_t
359 * @retval ::ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED ::rocprofiler_configure initialization
360 * phase has passed
361 * @retval ::ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND context is not valid
362 * @retval ::ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED Context has already been configured
363 * for the ::rocprofiler_buffer_tracing_kind_t kind
364 * @retval ::ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND Invalid ::rocprofiler_buffer_tracing_kind_t
365 * @retval ::ROCPROFILER_STATUS_ERROR_OPERATION_NOT_FOUND Invalid operation id for
366 * ::rocprofiler_buffer_tracing_kind_t kind was found
367 *
368 */
372 const rocprofiler_tracing_operation_t* operations,
373 size_t operations_count,
374 rocprofiler_buffer_id_t buffer_id) ROCPROFILER_API;
375
376/**
377 * @brief Query the name of the buffer tracing kind. The name retrieved from this function is a
378 * string literal that is encoded in the read-only section of the binary (i.e. it is always
379 * "allocated" and never "deallocated").
380 *
381 * @param [in] kind Buffer tracing domain
382 * @param [out] name If non-null and the name is a constant string that does not require dynamic
383 * allocation, this paramter will be set to the address of the string literal, otherwise it will
384 * be set to nullptr
385 * @param [out] name_len If non-null, this will be assigned the length of the name (regardless of
386 * the name is a constant string or requires dynamic allocation)
387 * @return ::rocprofiler_status_t
388 * @retval ::ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND Returned if the domain id is not valid
389 * @retval ::ROCPROFILER_STATUS_SUCCESS Returned if a valid domain, regardless if there is a
390 * constant string or not.
391 */
394 const char** name,
395 uint64_t* name_len) ROCPROFILER_API;
396
397/**
398 * @brief Query the name of the buffer tracing kind. The name retrieved from this function is a
399 * string literal that is encoded in the read-only section of the binary (i.e. it is always
400 * "allocated" and never "deallocated").
401 *
402 * @param [in] kind Buffer tracing domain
403 * @param [in] operation Enumeration id value which maps to a specific API function or event type
404 * @param [out] name If non-null and the name is a constant string that does not require dynamic
405 * allocation, this paramter will be set to the address of the string literal, otherwise it will
406 * be set to nullptr
407 * @param [out] name_len If non-null, this will be assigned the length of the name (regardless of
408 * the name is a constant string or requires dynamic allocation)
409 * @return ::rocprofiler_status_t
410 * @retval ::ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND An invalid domain id
411 * @retval ::ROCPROFILER_STATUS_ERROR_OPERATION_NOT_FOUND The operation number is not recognized for
412 * the given domain
413 * @retval ::ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED Rocprofiler does not support providing the
414 * operation name within this domain
415 * @retval ::ROCPROFILER_STATUS_SUCCESS Valid domain and operation, regardless of whether there is a
416 * constant string or not.
417 */
421 const char** name,
422 uint64_t* name_len) ROCPROFILER_API;
423
424/**
425 * @brief Iterate over all the buffer tracing kinds and invokes the callback for each buffer tracing
426 * kind.
427 *
428 * This is typically used to invoke ::rocprofiler_iterate_buffer_tracing_kind_operations for each
429 * buffer tracing kind.
430 *
431 * @param [in] callback Callback function invoked for each enumeration value in @ref
432 * rocprofiler_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
433 * @param [in] data User data passed back into the callback
434 */
437 void* data) ROCPROFILER_API ROCPROFILER_NONNULL(1);
438
439/**
440 * @brief Iterates over all the operations for a given @ref
441 * rocprofiler_buffer_tracing_kind_t and invokes the callback with the kind and operation
442 * id. This is useful to build a map of the operation names during tool initialization instead of
443 * querying rocprofiler everytime in the callback hotpath.
444 *
445 * @param [in] kind which buffer tracing kind operations to iterate over
446 * @param [in] callback Callback function invoked for each operation associated with @ref
447 * rocprofiler_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
448 * @param [in] data User data passed back into the callback
449 */
454 void* data) ROCPROFILER_API ROCPROFILER_NONNULL(2);
455
456/** @} */
457
458ROCPROFILER_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:475
rocprofiler_scratch_memory_operation_t
Scratch event kind.
Definition fwd.h:351
rocprofiler_page_migration_operation_t
Page migration event.
Definition fwd.h:334
rocprofiler_memory_copy_operation_t
Memory Copy Operations.
Definition fwd.h:228
rocprofiler_runtime_initialization_operation_t
ROCProfiler Runtime Initialization Tracer Operations.
Definition fwd.h:393
rocprofiler_memory_allocation_operation_t
Memory Allocation Operation.
Definition fwd.h:241
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:466
rocprofiler_buffer_tracing_kind_t
Service Buffer Tracing Kind.
Definition fwd.h:185
rocprofiler_kernel_dispatch_operation_t
ROCProfiler Kernel Dispatch Tracing Operation Types.
Definition fwd.h:254
uint64_t rocprofiler_timestamp_t
ROCProfiler Timestamp.
Definition fwd.h:461
Agent Identifier.
Definition fwd.h:578
Context ID.
Definition fwd.h:539
ROCProfiler Record Correlation ID.
Definition fwd.h:555
ROCProfiler kernel dispatch information.
Definition fwd.h:690
Stores memory address for profiling.
Definition fwd.h:524
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_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_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 timestamp
start time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_BUFFER_TRACING_KERNEL_DISPATCH
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_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_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 Runtime Initialization Tracer Record.
ROCProfiler Buffer Scratch Memory Tracer Record.
rocprofiler_scratch_alloc_flag_t
Allocation flags for.