This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

Tracer Part Handling

Tracer Part Handling#

rocprofiler: Tracer Part Handling

Data Structures

struct  rocprofiler_tracer_operation_id_t
 Tracing Operation ID for HIP/HSA. More...
 
struct  rocprofiler_tracer_activity_correlation_id_t
 Correlation identifier. More...
 
struct  rocprofiler_tracer_api_data_t
 Tracer API Calls Data Handler. More...
 
struct  rocprofiler_tracer_external_id_t
 Tracing external ID. More...
 
struct  rocprofiler_record_tracer_t
 Tracing record, this will represent all the information reported by the tracer regarding APIs and their data that were traced and collected by the tracer 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_async_callback_t. More...
 
struct  rocprofiler_kernel_dispatch_id_t
 Kernel dispatch correlation ID, unique across all dispatches. More...
 
struct  rocprofiler_pc_sample_t
 An individual PC sample. More...
 
struct  rocprofiler_record_pc_sample_t
 PC sample record: contains the program counter/instruction pointer observed during periodic sampling of a kernel. More...
 

Enumerations

enum  rocprofiler_tracer_activity_domain_t {
  ACTIVITY_DOMAIN_HSA_API = 0 , ACTIVITY_DOMAIN_HSA_OPS = 1 , ACTIVITY_DOMAIN_HIP_OPS = 2 , ACTIVITY_DOMAIN_HIP_API = 3 ,
  ACTIVITY_DOMAIN_KFD_API = 4 , ACTIVITY_DOMAIN_EXT_API = 5 , ACTIVITY_DOMAIN_ROCTX = 6 , ACTIVITY_DOMAIN_HSA_EVT = 7 ,
  ACTIVITY_DOMAIN_NUMBER
}
 Traced API domains. More...
 
enum  rocprofiler_api_tracing_phase_t { ROCPROFILER_PHASE_NONE = 0 , ROCPROFILER_PHASE_ENTER = 1 , ROCPROFILER_PHASE_EXIT = 2 }
 

Functions

ROCPROFILER_API rocprofiler_status_t rocprofiler_query_tracer_operation_name (rocprofiler_tracer_activity_domain_t domain, rocprofiler_tracer_operation_id_t operation_id, const char **name)
 Get Tracer API Function Name. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_tracer_operation_id (rocprofiler_tracer_activity_domain_t domain, const char *name, rocprofiler_tracer_operation_id_t *operation_id)
 Get Tracer API Operation ID. More...
 

Detailed Description

Enumeration Type Documentation

◆ rocprofiler_api_tracing_phase_t

Enumerator
ROCPROFILER_PHASE_NONE 

No phase, it is an activity record or asynchronous output data.

ROCPROFILER_PHASE_ENTER 

Enter phase for API calls.

ROCPROFILER_PHASE_EXIT 

Exit phase for API calls.

◆ rocprofiler_tracer_activity_domain_t

Traced API domains.

Enumerator
ACTIVITY_DOMAIN_HSA_API 

HSA API domain.

ACTIVITY_DOMAIN_HSA_OPS 

HSA async activity domain.

ACTIVITY_DOMAIN_HIP_OPS 

HIP async activity domain.

ACTIVITY_DOMAIN_HIP_API 

HIP API domain.

ACTIVITY_DOMAIN_KFD_API 

KFD API domain.

ACTIVITY_DOMAIN_EXT_API 

External ID domain.

ACTIVITY_DOMAIN_ROCTX 

ROCTX domain.

ACTIVITY_DOMAIN_HSA_EVT 

HSA events (Device Activity)

ACTIVITY_DOMAIN_NUMBER 

Function Documentation

◆ rocprofiler_query_tracer_operation_name()

ROCPROFILER_API rocprofiler_status_t rocprofiler_query_tracer_operation_name ( rocprofiler_tracer_activity_domain_t  domain,
rocprofiler_tracer_operation_id_t  operation_id,
const char **  name 
)

Get Tracer API Function Name.

Return NULL if the name is not found for given domain and operation_id.

Note: The returned string is NULL terminated.

Parameters
[in]domain
[in]operation_id
[out]name
Returns
rocprofiler_status_t

◆ rocprofiler_tracer_operation_id()

ROCPROFILER_API rocprofiler_status_t rocprofiler_tracer_operation_id ( rocprofiler_tracer_activity_domain_t  domain,
const char *  name,
rocprofiler_tracer_operation_id_t operation_id 
)

Get Tracer API Operation ID.

Parameters
[in]domain
[in]name
[out]operation_id
Returns
rocprofiler_status_t