Thread Trace Service#
|
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
|
Provides API calls to enable and handle thread trace data. More...
Data Structures | |
| struct | rocprofiler_att_parameter_t |
| union | rocprofiler_att_parameter_t.__unnamed1__ |
| struct | rocprofiler_att_parameter_t.__unnamed1__.__unnamed3__ |
Typedefs | |
| typedef void(* | rocprofiler_att_shader_data_callback_t) (rocprofiler_agent_id_t agent, int64_t shader_engine_id, void *data, unsigned long data_size, rocprofiler_user_data_t userdata) |
| Callback to be triggered every time some ATT data is generated by the device. | |
| typedef rocprofiler_att_control_flags_t(* | rocprofiler_att_dispatch_callback_t) (rocprofiler_agent_id_t agent_id, rocprofiler_queue_id_t queue_id, rocprofiler_correlation_id_t correlation_id, rocprofiler_kernel_id_t kernel_id, rocprofiler_dispatch_id_t dispatch_id, void *userdata_config, rocprofiler_user_data_t *userdata_shader) |
| Callback to be triggered every kernel dispatch, indicating to start and/or stop ATT. | |
Functions | |
| rocprofiler_status_t | rocprofiler_configure_agent_thread_trace_service (rocprofiler_context_id_t context_id, rocprofiler_att_parameter_t *parameters, unsigned long num_parameters, rocprofiler_agent_id_t agent_id, rocprofiler_att_shader_data_callback_t shader_callback, rocprofiler_user_data_t callback_userdata) |
| Configure Thread Trace Service for agent. There may only be one agent profile configured per context and can be only one active context that is profiling a single agent at a time. Multiple agent contexts can be started at the same time if they are profiling different agents. | |
| rocprofiler_status_t | rocprofiler_configure_dispatch_thread_trace_service (rocprofiler_context_id_t context_id, rocprofiler_att_parameter_t *parameters, unsigned long num_parameters, rocprofiler_att_dispatch_callback_t dispatch_callback, rocprofiler_att_shader_data_callback_t shader_callback, void *callback_userdata) |
| Enables the advanced thread trace service for dispatch-based tracing. The tool has an option to enable/disable thread trace on every dispatch callback. This service enables kernel serialization. | |
Detailed Description
Provides API calls to enable and handle thread trace data.
Data Structure Documentation
◆ rocprofiler_att_parameter_t
| struct rocprofiler_att_parameter_t |
Definition at line 51 of file thread_trace_core.h.
Collaboration diagram for rocprofiler_att_parameter_t:| Data Fields | ||
|---|---|---|
| union rocprofiler_att_parameter_t.__unnamed1__ | __unnamed__ | |
| rocprofiler_att_parameter_type_t | type | |
◆ rocprofiler_att_parameter_t.__unnamed1__
| union rocprofiler_att_parameter_t.__unnamed1__ |
Definition at line 54 of file thread_trace_core.h.
Collaboration diagram for rocprofiler_att_parameter_t.__unnamed1__:| Data Fields | ||
|---|---|---|
| struct rocprofiler_att_parameter_t.__unnamed1__.__unnamed3__ | __unnamed__ | |
| uint64_t | value | |
◆ rocprofiler_att_parameter_t.__unnamed1__.__unnamed3__
| struct rocprofiler_att_parameter_t.__unnamed1__.__unnamed3__ |
Definition at line 57 of file thread_trace_core.h.
Collaboration diagram for rocprofiler_att_parameter_t.__unnamed1__.__unnamed3__:| Data Fields | ||
|---|---|---|
| rocprofiler_counter_id_t | counter_id | |
| uint64_t | simd_mask: 4 | |
Typedef Documentation
◆ rocprofiler_att_dispatch_callback_t
| typedef rocprofiler_att_control_flags_t(* rocprofiler_att_dispatch_callback_t) (rocprofiler_agent_id_t agent_id, rocprofiler_queue_id_t queue_id, rocprofiler_correlation_id_t correlation_id, rocprofiler_kernel_id_t kernel_id, rocprofiler_dispatch_id_t dispatch_id, void *userdata_config, rocprofiler_user_data_t *userdata_shader) |
Callback to be triggered every kernel dispatch, indicating to start and/or stop ATT.
- Parameters
-
[in] agent_id agent_id. [in] queue_id queue_id. [in] correlation_id internal correlation id. [in] kernel_id kernel_id. [in] dispatch_id dispatch_id. [in] userdata_config Userdata passed back from rocprofiler_configure_dispatch_thread_trace_service. [out] userdata_shader Userdata to be passed in shader_callback
Definition at line 57 of file thread_trace_dispatch.h.
◆ rocprofiler_att_shader_data_callback_t
| typedef void(* rocprofiler_att_shader_data_callback_t) (rocprofiler_agent_id_t agent, int64_t shader_engine_id, void *data, unsigned long data_size, rocprofiler_user_data_t userdata) |
Callback to be triggered every time some ATT data is generated by the device.
- Parameters
-
[in] shader_engine_id ID of shader engine, as enabled by SE_MASK [in] data Pointer to the buffer containing the ATT data [in] data_size Number of bytes in "data" [in] userdata Passed back to user from rocprofiler_att_dispatch_callback_t()
Definition at line 72 of file thread_trace_core.h.
Enumeration Type Documentation
◆ rocprofiler_att_control_flags_t
| Enumerator | |
|---|---|
| ROCPROFILER_ATT_CONTROL_NONE | |
| ROCPROFILER_ATT_CONTROL_START_AND_STOP | |
Definition at line 40 of file thread_trace_dispatch.h.
◆ rocprofiler_att_parameter_type_t
Definition at line 39 of file thread_trace_core.h.
Function Documentation
◆ rocprofiler_configure_agent_thread_trace_service()
| rocprofiler_status_t rocprofiler_configure_agent_thread_trace_service | ( | rocprofiler_context_id_t | context_id, |
| rocprofiler_att_parameter_t * | parameters, | ||
| unsigned long | num_parameters, | ||
| rocprofiler_agent_id_t | agent_id, | ||
| rocprofiler_att_shader_data_callback_t | shader_callback, | ||
| rocprofiler_user_data_t | callback_userdata | ||
| ) |
Configure Thread Trace Service for agent. There may only be one agent profile configured per context and can be only one active context that is profiling a single agent at a time. Multiple agent contexts can be started at the same time if they are profiling different agents.
- Parameters
-
[in] context_id context id [in] parameters List of ATT-specific parameters. [in] num_parameters Number of parameters. Zero is allowed. [in] agent_id agent to configure profiling on. [in] shader_callback Callback fn where the collected data will be sent to. [in] callback_userdata Passed back to user in shader_callback.
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS on success ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED for configuration locked ROCPROFILER_STATUS_ERROR_CONTEXT_INVALID for conflicting configurations in the same ctx ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND for invalid context id ROCPROFILER_STATUS_ERROR_INVALID_ARGUMENT for invalid rocprofiler_att_parameter_t
◆ rocprofiler_configure_dispatch_thread_trace_service()
| rocprofiler_status_t rocprofiler_configure_dispatch_thread_trace_service | ( | rocprofiler_context_id_t | context_id, |
| rocprofiler_att_parameter_t * | parameters, | ||
| unsigned long | num_parameters, | ||
| rocprofiler_att_dispatch_callback_t | dispatch_callback, | ||
| rocprofiler_att_shader_data_callback_t | shader_callback, | ||
| void * | callback_userdata | ||
| ) |
Enables the advanced thread trace service for dispatch-based tracing. The tool has an option to enable/disable thread trace on every dispatch callback. This service enables kernel serialization.
- Parameters
-
[in] context_id context_id. [in] parameters List of ATT-specific parameters. [in] num_parameters Number of parameters. Zero is allowed. [in] dispatch_callback Control fn which decides when ATT starts/stop collecting. [in] shader_callback Callback fn where the collected data will be sent to. [in] callback_userdata Passed back to user in dispatch_callback.
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS on success ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED for configuration locked ROCPROFILER_STATUS_ERROR_CONTEXT_INVALID for conflicting configurations in the same ctx ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND for invalid context id ROCPROFILER_STATUS_ERROR_INVALID_ARGUMENT for invalid rocprofiler_att_parameter_t ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED if already configured
Generated by