Counter Collection Handling

Counter Collection Handling#

ROCProfiler API library: Counter Collection Handling

records More...

Data Structures

struct  rocprofiler_counter_info_t
 
struct  rocprofiler_counter_id_t
 Counter ID to be used to query counter information using rocprofiler_query_counter_info. More...
 
struct  rocprofiler_queue_index_t
 
struct  rocprofiler_record_counter_value_t
 Counter Value Structure. More...
 
struct  rocprofiler_record_counter_instance_t
 Counter Instance Structure, it will represent every counter reported in the array of counters reported by every profiler record if counters were needed to be collected. More...
 
struct  rocprofiler_record_counters_instances_count_t
 Counters Instances Count Structure, every profiling record has this structure included to report the number of counters collected for this kernel dispatch. More...
 
struct  rocprofiler_kernel_properties_t
 Kernel properties, this will represent the kernel properties such as its grid size, workgroup size, wave_size. More...
 
struct  rocprofiler_correlation_id_t
 Correlation ID. More...
 
struct  rocprofiler_record_profiler_t
 Profiling record, this will represent all the information reported by the profiler regarding kernel dispatches and their counters that were collected by the profiler and requested by the user, this can be used as the type of the flushed records that is reported to the user using rocprofiler_buffer_callback_t. More...
 
struct  rocprofiler_event_id_t
 
struct  rocprofiler_record_spm_counters_instances_count_t
 
struct  rocprofiler_record_se_spm_data_t
 Counters, including identifiers to get counter information and Counters values. More...
 
struct  rocprofiler_record_spm_t
 SPM record, this will represent all the information reported by the SPM regarding counters and their timestamps this can be used as the type of the flushed records that is reported to the user using rocprofiler_buffer_callback_t. More...
 
struct  rocprofiler_record_se_att_data_t
 struct to store the trace data from a shader engine. More...
 
struct  rocprofiler_intercepted_codeobj_t
 struct to store the filepaths and their addresses for intercepted code objects More...
 
struct  rocprofiler_codeobj_symbols_t
 struct to store the filepaths and their addresses for intercepted code objects More...
 
struct  rocprofiler_record_att_tracer_t
 ATT tracing record structure. More...
 

Typedefs

typedef int(* rocprofiler_counters_info_callback_t) (rocprofiler_counter_info_t counter, const char *gpu_name, uint32_t gpu_index) ROCPROFILER_VERSION_9_0
 

Enumerations

enum  rocprofiler_counter_info_kind_t { ROCPROFILER_COUNTER_NAME = 0 , ROCPROFILER_COUNTER_BLOCK_ID = 2 , ROCPROFILER_COUNTER_HIERARCHY_LEVEL = 3 }
 Counter Information Types, can be used by rocprofiler_query_counter_info. More...
 
enum  rocprofiler_codeobj_capture_mode_t { ROCPROFILER_CAPTURE_SYMBOLS_ONLY = 0 , ROCPROFILER_CAPTURE_COPY_MEMORY = 1 , ROCPROFILER_CAPTURE_COPY_FILE_AND_MEMORY = 2 }
 Enum defines how code object is captured for ATT and PC Sampling. More...
 

Functions

ROCPROFILER_API rocprofiler_status_t rocprofiler_iterate_counters (rocprofiler_counters_info_callback_t counters_info_callback) ROCPROFILER_VERSION_9_0
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_counter_info_size (rocprofiler_session_id_t session_id, rocprofiler_counter_info_kind_t counter_info_type, rocprofiler_counter_id_t counter_id, size_t *data_size) ROCPROFILER_VERSION_9_0
 Query Counter Information Data size to allow the user to allocate the right size for the information data requested, the information will be collected using rocprofiler_counter_id_t by using rocprofiler_query_counter_info and the user need to identify one type of information available in rocprofiler_counter_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_counter_info (rocprofiler_session_id_t session_id, rocprofiler_counter_info_kind_t kind, rocprofiler_counter_id_t counter_id, const char **data) ROCPROFILER_VERSION_9_0
 Query Counter Information Data using an allocated data pointer by the user, user can get the size of the data using rocprofiler_query_counter_info_size, the user can get the data using rocprofiler_counter_id_t and the user need to identify one type of information available in rocprofiler_counter_info_t. More...
 

Detailed Description

records

Typedef Documentation

◆ rocprofiler_counters_info_callback_t

typedef int(* rocprofiler_counters_info_callback_t) (rocprofiler_counter_info_t counter, const char *gpu_name, uint32_t gpu_index) ROCPROFILER_VERSION_9_0

Enumeration Type Documentation

◆ rocprofiler_codeobj_capture_mode_t

Enum defines how code object is captured for ATT and PC Sampling.

Enumerator
ROCPROFILER_CAPTURE_SYMBOLS_ONLY 

Capture file and memory paths for the loaded code object.

ROCPROFILER_CAPTURE_COPY_MEMORY 

Capture symbols for file:// and memory:// type objects, and generate a copy of all kernel code for objects under memory://.

ROCPROFILER_CAPTURE_COPY_FILE_AND_MEMORY 

Capture symbols and all kernel code for file:// and memory:// type objects.

◆ rocprofiler_counter_info_kind_t

Counter Information Types, can be used by rocprofiler_query_counter_info.

Enumerator
ROCPROFILER_COUNTER_NAME 

Can be used to get the counter name.

ROCPROFILER_COUNTER_BLOCK_ID 

Can be used to get the block id of a counter.

ROCPROFILER_COUNTER_HIERARCHY_LEVEL 

This is the level of hierarchy from the GFX_IP where the counter value should be collected.

Function Documentation

◆ rocprofiler_iterate_counters()

ROCPROFILER_API rocprofiler_status_t rocprofiler_iterate_counters ( rocprofiler_counters_info_callback_t  counters_info_callback)

◆ rocprofiler_query_counter_info()

ROCPROFILER_API rocprofiler_status_t rocprofiler_query_counter_info ( rocprofiler_session_id_t  session_id,
rocprofiler_counter_info_kind_t  kind,
rocprofiler_counter_id_t  counter_id,
const char **  data 
)

Query Counter Information Data using an allocated data pointer by the user, user can get the size of the data using rocprofiler_query_counter_info_size, the user can get the data using rocprofiler_counter_id_t and the user need to identify one type of information available in rocprofiler_counter_info_t.

Parameters
[in]session_idSession id where this data was collected
[in]kindInformation kind requested by the user
[in]counter_idCounter ID
[out]dataInformation Data
Return values
ROCPROFILER_STATUS_SUCCESS,ifthe information was found
ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED
if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called
ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND
if the counter was not found in the saved counters
ROCPROFILER_STATUS_ERROR_COUNTER_INFORMATION_MISSING
if the counter was found in the saved counters but the required information is missing

◆ rocprofiler_query_counter_info_size()

ROCPROFILER_API rocprofiler_status_t rocprofiler_query_counter_info_size ( rocprofiler_session_id_t  session_id,
rocprofiler_counter_info_kind_t  counter_info_type,
rocprofiler_counter_id_t  counter_id,
size_t *  data_size 
)

Query Counter Information Data size to allow the user to allocate the right size for the information data requested, the information will be collected using rocprofiler_counter_id_t by using rocprofiler_query_counter_info and the user need to identify one type of information available in rocprofiler_counter_info_t.

Parameters
[in]session_idSession id where this data was collected
[in]counter_info_typeThe tyoe of information needed
[in]counter_idCounter ID
[out]data_sizeCounter Information Data size
Return values
ROCPROFILER_STATUS_SUCCESS,ifthe information was found
ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED
if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called
ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND
if the counter was not found in the saved counters
ROCPROFILER_STATUS_ERROR_COUNTER_INFORMATION_MISSING
if the counter was found in the saved counters but the required information is missing