Hardware counters Information#
Rocprofiler SDK Developer API 0.4.0
ROCm Profiling API and tools
|
Query functions related to hardware counters. More...
Typedefs | |
typedef rocprofiler_status_t(* | rocprofiler_available_dimensions_cb_t) (rocprofiler_counter_id_t id, const rocprofiler_record_dimension_info_t *dim_info, unsigned long num_dims, void *user_data) |
Callback that gives a list of available dimensions for a counter. | |
typedef rocprofiler_status_t(* | rocprofiler_available_counters_cb_t) (rocprofiler_agent_id_t agent_id, rocprofiler_counter_id_t *counters, unsigned long num_counters, void *user_data) |
Callback that gives a list of counters available on an agent. The counters variable is owned by rocprofiler and should not be free'd. | |
Detailed Description
Query functions related to hardware counters.
Typedef Documentation
◆ rocprofiler_available_counters_cb_t
typedef rocprofiler_status_t(* rocprofiler_available_counters_cb_t) (rocprofiler_agent_id_t agent_id, rocprofiler_counter_id_t *counters, unsigned long num_counters, void *user_data) |
Callback that gives a list of counters available on an agent. The counters variable is owned by rocprofiler and should not be free'd.
- Parameters
-
[in] agent_id Agent ID of the current callback [in] counters An array of counters that are avialable on the agent rocprofiler_iterate_agent_supported_counters was called on. [in] num_counters Number of counters contained in counters [in] user_data User data supplied by rocprofiler_iterate_agent_supported_counters
Definition at line 141 of file counters.h.
◆ rocprofiler_available_dimensions_cb_t
typedef rocprofiler_status_t(* rocprofiler_available_dimensions_cb_t) (rocprofiler_counter_id_t id, const rocprofiler_record_dimension_info_t *dim_info, unsigned long num_dims, void *user_data) |
Callback that gives a list of available dimensions for a counter.
- Parameters
-
[in] id Counter id the dimension data is for [in] dim_info An array of dimensions for the counter rocprofiler_iterate_counter_dimensions was called on. [in] num_dims Number of dimensions [in] user_data User data supplied by rocprofiler_iterate_agent_supported_counters
Definition at line 75 of file counters.h.
Function Documentation
◆ rocprofiler_iterate_agent_supported_counters()
rocprofiler_status_t rocprofiler_iterate_agent_supported_counters | ( | rocprofiler_agent_id_t | agent_id, |
rocprofiler_available_counters_cb_t | cb, | ||
void * | user_data | ||
) |
Query Agent Counters Availability.
- Parameters
-
[in] agent_id GPU agent identifier [in] cb callback to caller to get counters [in] user_data data to pass into the callback
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS if counters found for agent ROCPROFILER_STATUS_ERROR if no counters found for agent
◆ rocprofiler_iterate_counter_dimensions()
rocprofiler_status_t rocprofiler_iterate_counter_dimensions | ( | rocprofiler_counter_id_t | id, |
rocprofiler_available_dimensions_cb_t | info_cb, | ||
void * | user_data | ||
) |
Return information about the dimensions that exists for a specific counter and the extent of each dimension.
- Parameters
-
[in] id counter id to query dimension info for. [in] info_cb Callback to return dimension information for counter [in] user_data data to pass into the callback
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS if dimension exists ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND if counter is not found ROCPROFILER_STATUS_ERROR_DIM_NOT_FOUND if counter does not have this dimension
◆ rocprofiler_query_counter_info()
rocprofiler_status_t rocprofiler_query_counter_info | ( | rocprofiler_counter_id_t | counter_id, |
rocprofiler_counter_info_version_id_t | version, | ||
void * | info | ||
) |
Query Counter info such as name or description.
- Parameters
-
[in] counter_id counter to get info for [in] version Version of struct in info, see rocprofiler_counter_info_version_id_t for available types [out] info rocprofiler_counter_info_{version}_t struct to write info to.
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS if counter found ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND if counter not found ROCPROFILER_STATUS_ERROR_INCOMPATIBLE_ABI Version is not supported
◆ rocprofiler_query_counter_instance_count()
rocprofiler_status_t rocprofiler_query_counter_instance_count | ( | rocprofiler_agent_id_t | agent_id, |
rocprofiler_counter_id_t | counter_id, | ||
unsigned long * | instance_count | ||
) |
This call returns the number of instances specific counter contains.
- Parameters
-
[in] agent_id rocprofiler agent identifier [in] counter_id counter id (obtained from iterate_agent_supported_counters) [out] instance_count number of instances the counter has
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS if counter found ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND if counter not found
◆ rocprofiler_query_record_counter_id()
rocprofiler_status_t rocprofiler_query_record_counter_id | ( | rocprofiler_counter_instance_id_t | id, |
rocprofiler_counter_id_t * | counter_id | ||
) |
Query counter id information from record_id.
- Parameters
-
[in] id record id from rocprofiler_record_counter_t [out] counter_id counter id associated with the record
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS if id decoded
◆ rocprofiler_query_record_dimension_position()
rocprofiler_status_t rocprofiler_query_record_dimension_position | ( | rocprofiler_counter_instance_id_t | id, |
rocprofiler_counter_dimension_id_t | dim, | ||
unsigned long * | pos | ||
) |
Query dimension position from record_id. If the dimension does not exist in the counter, the return will be 0.
- Parameters
-
[in] id record id from rocprofiler_record_counter_t [in] dim dimension for which positional info is requested (currently only 0 is allowed, i.e. flat array without dimension). [out] pos value of the dimension in id
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS if dimension decoded
Generated by 1.9.8