rocprofiler-sdk/callback_tracing.h Source File#
|
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
|
callback_tracing.h
Go to the documentation of this file.
59 HSA_VEN_AMD_LOADER_CODE_OBJECT_STORAGE_TYPE_MEMORY,
323 * before the function is invoked and once after the function is invoked. The external correlation
324 * id value within the record is assigned the value at the top of the external correlation id stack.
325 * It is permissible to invoke @ref rocprofiler_push_external_correlation_id within the enter phase;
326 * when a new external correlation id is pushed during the enter phase, rocprofiler will use that
327 * external correlation id for any async events and provide the new external correlation id during
329 * callback will result in that external correlation id value in the exit callback (which may or may
330 * not be different from the external correlation id value in the enter callback). If a tool pushes
335 * @param [in,out] user_data This paramter can be used to retain information in between the enter
369 * @param [in] arg_indirection_count the total number of indirection levels for the argument, e.g.
374 * @param [in] arg_dereference_count the number of times the argument was dereferenced when it was
391 * @brief Configure Callback Tracing Service. The callback tracing service provides two synchronous
392 * callbacks around an API function on the same thread as the application which is invoking the API
395 * once for the HIP API, and so on but it will fail if it is invoked for the HSA API twice. Please
397 * arguments into the record. If you are willing to let rocprofiler record the timestamps, do not
398 * require synchronous notifications of the API calls, and want to lowest possible overhead, use the
413 * @retval ::ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND The provided context is not valid/registered
416 * other words, we do not support overriding or combining the operations in separate function calls.
428 * @brief Query the name of the callback tracing kind. The name retrieved from this function is a
436 * @param [out] name_len If non-null, this will be assigned the length of the name (regardless of
446 * @brief Query the name of the callback tracing kind. The name retrieved from this function is a
451 * @param [in] operation Enumeration id value which maps to a specific API function or event type
455 * @param [out] name_len If non-null, this will be assigned the length of the name (regardless of
469 * @brief Iterate over all the mappings of the callback tracing kinds and get a callback for each
505 * It is recommended to use this function when the record phase is ::ROCPROFILER_CALLBACK_PHASE_EXIT
506 * or ::ROCPROFILER_CALLBACK_PHASE_NONE. When the phase is ::ROCPROFILER_CALLBACK_PHASE_ENTER, the
507 * function may have output parameters which have not set. In the case of an output parameter with
509 * parameter is either null or, in the worst case scenario, pointing to an uninitialized value which
510 * will result in garbage values to be stringified. However, if the output parameter has more than
550 * parameters which have not been set. When the output parameter has multiple levels of indirection,
551 * it may be invalid to dereference the output parameter more than once and doing so may result in a
552 * segmentation fault. Thus, it is recommended to set this parameter to a maximum value of 1 when
553 * the phase is ::ROCPROFILER_CALLBACK_PHASE_ENTER to ensure that output parameters which point to
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
Multi-dimensional struct of data used to describe GPU workgroup and grid sizes.
Definition fwd.h:619
const char * device_function
device function name used to map the metadata during kernel launch
Definition callback_tracing.h:240
uint32_t group_segment_size
Size of static group segment memory required by the kernel (per work-group), in bytes....
Definition callback_tracing.h:197
rocprofiler_hip_api_retval_t retval
Definition callback_tracing.h:80
hsa_amd_tool_event_kind_t args_kind
Definition callback_tracing.h:302
uint32_t kernarg_segment_alignment
Alignment (in bytes) of the buffer used to pass arguments to the kernel.
Definition callback_tracing.h:196
rocprofiler_hsa_api_retval_t retval
Definition callback_tracing.h:70
rocprofiler_address_t modules
reference address where modules will be loaded
Definition callback_tracing.h:239
rocprofiler_code_object_storage_type_t storage_type
storage type of the code object reader used to load the loaded code object
Definition callback_tracing.h:139
rocprofiler_hip_api_args_t args
Definition callback_tracing.h:79
uint32_t arch_vgpr_count
Architecture vector general purpose register count.
Definition callback_tracing.h:200
rocprofiler_scratch_alloc_flag_t flags
Definition callback_tracing.h:301
rocprofiler_rocdecode_api_args_t args
Definition callback_tracing.h:118
rocprofiler_queue_id_t queue_id
Definition callback_tracing.h:300
uint32_t accum_vgpr_count
Accum vector general purpose register count.
Definition callback_tracing.h:201
uint64_t kernel_object
kernel object handle, used in the kernel dispatch packet
Definition callback_tracing.h:194
rocprofiler_rccl_api_retval_t retval
Definition callback_tracing.h:109
rocprofiler_ompt_args_t args
Definition callback_tracing.h:89
uint32_t private_segment_size
Size of static private, spill, and arg segment memory required by this kernel (per work-item),...
Definition callback_tracing.h:198
uint64_t instance
Number of times this runtime had been loaded previously.
Definition callback_tracing.h:313
hsa_agent_t hsa_agent
Deprecated. The agent on which this loaded code object is loaded.
Definition callback_tracing.h:134
rocprofiler_address_t kernel_address
The first address of a kernel. Useful for PC sampling.
Definition callback_tracing.h:203
uint64_t load_base
The base memory address at which the code object is loaded. This is the base address of the allocatio...
Definition callback_tracing.h:136
uint64_t load_size
The byte size of the loaded code objects contiguous memory allocation.
Definition callback_tracing.h:137
rocprofiler_rocdecode_api_retval_t retval
Definition callback_tracing.h:119
rocprofiler_marker_api_args_t args
Definition callback_tracing.h:98
int64_t load_delta
The signed byte address difference of the memory address at which the code object is loaded minus the...
Definition callback_tracing.h:138
uint32_t kernarg_segment_size
size of memory (in bytes) allocated for kernel arguments. Will be multiple of 16
Definition callback_tracing.h:195
int64_t kernel_code_entry_byte_offset
Relative offset from kernel_object address to calculate the first address of a kernel.
Definition callback_tracing.h:202
rocprofiler_marker_api_retval_t retval
Definition callback_tracing.h:99
rocprofiler_scratch_memory_args_t args
Definition callback_tracing.h:303
rocprofiler_address_t address
starting address for memory allocation
Definition callback_tracing.h:289
const char * uri
The URI name from which the code object was loaded.
Definition callback_tracing.h:135
rocprofiler_hsa_api_args_t args
Definition callback_tracing.h:69
rocprofiler_agent_id_t agent_id
Definition callback_tracing.h:299
rocprofiler_rccl_api_args_t args
Definition callback_tracing.h:108
rocprofiler_status_t rocprofiler_query_callback_tracing_kind_operation_name(rocprofiler_callback_tracing_kind_t kind, rocprofiler_tracing_operation_t operation, const char **name, uint64_t *name_len)
Query the name of the callback tracing kind. The name retrieved from this function is a string litera...
rocprofiler_status_t rocprofiler_iterate_callback_tracing_kind_operation_args(rocprofiler_callback_tracing_record_t record, rocprofiler_callback_tracing_operation_args_cb_t callback, int32_t max_dereference_count, void *user_data)
int(* rocprofiler_callback_tracing_kind_cb_t)(rocprofiler_callback_tracing_kind_t kind, void *data)
Callback function for mapping rocprofiler_callback_tracing_kind_t ids to string names.
Definition callback_tracing.h:347
int(* rocprofiler_callback_tracing_kind_operation_cb_t)(rocprofiler_callback_tracing_kind_t kind, rocprofiler_tracing_operation_t operation, void *data)
Callback function for mapping the operations of a given rocprofiler_callback_tracing_kind_t to string...
Definition callback_tracing.h:355
int(* rocprofiler_callback_tracing_operation_args_cb_t)(rocprofiler_callback_tracing_kind_t kind, rocprofiler_tracing_operation_t operation, uint32_t arg_number, const void *const arg_value_addr, int32_t arg_indirection_count, const char *arg_type, const char *arg_name, const char *arg_value_str, int32_t arg_dereference_count, void *data)
Callback function for iterating over the function arguments to a traced function. This function will ...
Definition callback_tracing.h:378
rocprofiler_status_t rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_id, rocprofiler_callback_tracing_kind_t kind, const rocprofiler_tracing_operation_t *operations, unsigned long operations_count, rocprofiler_callback_tracing_cb_t callback, void *callback_args)
Configure Callback Tracing Service. The callback tracing service provides two synchronous callbacks a...
rocprofiler_status_t rocprofiler_query_callback_tracing_kind_name(rocprofiler_callback_tracing_kind_t kind, const char **name, uint64_t *name_len)
Query the name of the callback tracing kind. The name retrieved from this function is a string litera...
rocprofiler_code_object_storage_type_t
ROCProfiler Enumeration for code object storage types (identical values to hsa_ven_amd_loader_code_ob...
Definition callback_tracing.h:55
rocprofiler_status_t rocprofiler_iterate_callback_tracing_kind_operations(rocprofiler_callback_tracing_kind_t kind, rocprofiler_callback_tracing_kind_operation_cb_t callback, void *data)
Iterates over all the mappings of the operations for a given rocprofiler_callback_tracing_kind_t and ...
rocprofiler_status_t rocprofiler_iterate_callback_tracing_kinds(rocprofiler_callback_tracing_kind_cb_t callback, void *data)
Iterate over all the mappings of the callback tracing kinds and get a callback for each kind.
void(* rocprofiler_callback_tracing_cb_t)(rocprofiler_callback_tracing_record_t record, rocprofiler_user_data_t *user_data, void *callback_data)
API Tracing callback function. This function is invoked twice per API function: once before the funct...
Definition callback_tracing.h:339
@ ROCPROFILER_CODE_OBJECT_STORAGE_TYPE_NONE
Definition callback_tracing.h:56
@ ROCPROFILER_CODE_OBJECT_STORAGE_TYPE_MEMORY
Definition callback_tracing.h:58
@ ROCPROFILER_CODE_OBJECT_STORAGE_TYPE_FILE
Definition callback_tracing.h:57
@ ROCPROFILER_CODE_OBJECT_STORAGE_TYPE_LAST
Definition callback_tracing.h:60
Definition callback_tracing.h:233
ROCProfiler Code Object Kernel Symbol Tracer Callback Record.
Definition callback_tracing.h:189
ROCProfiler Code Object Load Tracer Callback Record.
Definition callback_tracing.h:126
ROCProfiler HIP runtime and compiler API Tracer Callback Data.
Definition callback_tracing.h:77
ROCProfiler HSA API Callback Data.
Definition callback_tracing.h:67
ROCProfiler Kernel Dispatch Callback Tracer Record.
Definition callback_tracing.h:257
ROCProfiler Marker Tracer Callback Data.
Definition callback_tracing.h:96
ROCProfiler Memory Allocation Tracer Record.
Definition callback_tracing.h:284
ROCProfiler Memory Copy Callback Tracer Record.
Definition callback_tracing.h:271
ROCProfiler OMPT Callback Data.
Definition callback_tracing.h:87
ROCProfiler RCCL API Callback Data.
Definition callback_tracing.h:106
ROCProfiler ROCDecode API Callback Data.
Definition callback_tracing.h:116
ROCProfiler Runtime Initialization Data.
Definition callback_tracing.h:310
ROCProfiler Scratch Memory Callback Data.
Definition callback_tracing.h:297
Definition api_args.h:65
Definition api_args.h:49
Definition api_args.h:71
Definition api_args.h:45
Definition api_args.h:51
Definition api_args.h:44
Definition api_args.h:64
Definition api_args.h:65
Definition api_args.h:59
Generated by