/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocprofiler-docs/checkouts/docs-5.7.1/inc/rocprofiler.h File Reference

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocprofiler-docs/checkouts/docs-5.7.1/inc/rocprofiler.h File Reference#

ROCProfilerV1 API: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocprofiler-docs/checkouts/docs-5.7.1/inc/rocprofiler.h File Reference
rocprofiler.h File Reference

ROCPROFILER API interface. More...

#include <stddef.h>
#include <stdint.h>
#include <hsa/amd_hsa_kernel_code.h>
#include <hsa/hsa.h>
#include <hsa/hsa_ext_amd.h>
#include <hsa/hsa_ven_amd_aqlprofile.h>

Go to the source code of this file.

Data Structures

struct  rocprofiler_session_id_t
 Session Identifier. More...
 
struct  rocprofiler_timestamp_t
 ROCProfiling Timestamp Type. More...
 
struct  rocprofiler_record_header_timestamp_t
 Timestamps (start & end), it will be used for kernel dispatch tracing as well as API Tracing. More...
 
struct  rocprofiler_record_id_t
 A unique identifier for every record. More...
 
struct  rocprofiler_record_header_t
 Generic ROCProfiler record header. More...
 
struct  rocprofiler_agent_id_t
 Agent ID handle, which represents a unique id to the agent reported as it can be used to retrieve Agent information using rocprofiler_query_agent_info, Agents can be CPUs or GPUs. More...
 
struct  rocprofiler_queue_id_t
 Unique ID handle to represent an HSA Queue of type hsa_queue_t, this id can be used by the user to get queue information using rocprofiler_query_queue_info. More...
 
struct  rocprofiler_kernel_id_t
 Kernel identifier that represent a unique id for every kernel. More...
 
struct  rocprofiler_thread_id_t
 Holds the thread id. More...
 
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_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_record_att_tracer_t
 ATT tracing record structure. More...
 
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_handle_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...
 
struct  rocprofiler_buffer_property_t
 
struct  rocprofiler_buffer_id_t
 
struct  rocprofiler_filter_id_t
 
struct  rocprofiler_att_parameter_t
 
struct  rocprofiler_filter_property_t
 Filter Data Type filter data will be used to report required and optional filters for the sessions using ::rocprofiler_session_add_filters. More...
 
struct  rocprofiler_spm_parameter_t
 
union  rocprofiler_filter_data_t
 Filter Kind Data. More...
 
struct  rocprofiler_counter_value_t
 
struct  rocprofiler_device_profile_metric_t
 
struct  rocprofiler_settings_t
 
struct  rocprofiler_data_t
 
struct  rocprofiler_feature_t
 
struct  rocprofiler_group_t
 
struct  rocprofiler_properties_t
 
struct  rocprofiler_dispatch_record_t
 
struct  rocprofiler_callback_data_t
 
struct  rocprofiler_queue_callbacks_t
 
union  rocprofiler_info_query_t
 
struct  rocprofiler_info_data_t
 
struct  rocprofiler_pool_entry_t
 
struct  rocprofiler_pool_properties_t
 
struct  rocprofiler_hsa_callback_data_t
 
struct  rocprofiler_hsa_callbacks_t
 

Macros

#define ROCPROFILER_CALL
 
#define ROCPROFILER_EXPORT   ROCPROFILER_EXPORT_DECORATOR ROCPROFILER_CALL
 
#define ROCPROFILER_IMPORT   ROCPROFILER_IMPORT_DECORATOR ROCPROFILER_CALL
 
#define ROCPROFILER_API   ROCPROFILER_IMPORT
 
#define ROCPROFILER_VERSION_9_0
 The function was introduced in version 9.0 of the interface and has the symbol version string of "ROCPROFILER_9.0". More...
 
#define ROCPROFILER_VERSION_MAJOR   9
 The major version of the interface as a macro so it can be used by the preprocessor. More...
 
#define ROCPROFILER_VERSION_MINOR   0
 The minor version of the interface as a macro so it can be used by the preprocessor. 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
 
typedef void(* rocprofiler_buffer_callback_t) (const rocprofiler_record_header_t *begin, const rocprofiler_record_header_t *end, rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id)
 Memory pool buffer callback. More...
 
typedef const char * rocprofiler_hip_function_name_t
 
typedef const char * rocprofiler_hsa_function_name_t
 
typedef void(* rocprofiler_sync_callback_t) (rocprofiler_record_tracer_t record, rocprofiler_session_id_t session_id)
 Synchronous Callback To be only used by rocprofiler_set_api_trace_sync_callback, please refer to rocprofiler_set_api_trace_sync_callback for more details. More...
 
typedef hsa_ven_amd_aqlprofile_parameter_t rocprofiler_parameter_t
 
typedef void rocprofiler_feature_set_t
 
typedef void rocprofiler_t
 
typedef bool(* rocprofiler_handler_t) (rocprofiler_group_t group, void *arg)
 
typedef hsa_status_t(* rocprofiler_callback_t) (const rocprofiler_callback_data_t *callback_data, void *user_data, rocprofiler_group_t *group)
 
typedef hsa_ven_amd_aqlprofile_data_callback_t rocprofiler_trace_data_callback_t
 
typedef void rocprofiler_pool_t
 
typedef bool(* rocprofiler_pool_handler_t) (const rocprofiler_pool_entry_t *entry, void *arg)
 
typedef hsa_status_t(* rocprofiler_hsa_callback_fun_t) (rocprofiler_hsa_cb_id_t id, const rocprofiler_hsa_callback_data_t *data, void *arg)
 

Enumerations

enum  rocprofiler_status_t {
  ROCPROFILER_STATUS_SUCCESS = 0 , ROCPROFILER_STATUS_ERROR = -1 , ROCPROFILER_STATUS_ERROR_ALREADY_INITIALIZED = -2 , ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED = -3 ,
  ROCPROFILER_STATUS_ERROR_SESSION_MISSING_BUFFER = -4 , ROCPROFILER_STATUS_ERROR_TIMESTAMP_NOT_APPLICABLE = -5 , ROCPROFILER_STATUS_ERROR_AGENT_NOT_FOUND = -6 , ROCPROFILER_STATUS_ERROR_AGENT_INFORMATION_MISSING = -7 ,
  ROCPROFILER_STATUS_ERROR_QUEUE_NOT_FOUND = -8 , ROCPROFILER_STATUS_ERROR_QUEUE_INFORMATION_MISSING = -9 , ROCPROFILER_STATUS_ERROR_KERNEL_NOT_FOUND = -10 , ROCPROFILER_STATUS_ERROR_KERNEL_INFORMATION_MISSING = -11 ,
  ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND = -12 , ROCPROFILER_STATUS_ERROR_COUNTER_INFORMATION_MISSING = -13 , ROCPROFILER_STATUS_ERROR_TRACER_API_DATA_NOT_FOUND = -14 , ROCPROFILER_STATUS_ERROR_TRACER_API_DATA_INFORMATION_MISSING = -15 ,
  ROCPROFILER_STATUS_ERROR_INCORRECT_DOMAIN = -16 , ROCPROFILER_STATUS_ERROR_SESSION_NOT_FOUND = -17 , ROCPROFILER_STATUS_ERROR_CORRUPTED_SESSION_BUFFER = -18 , ROCPROFILER_STATUS_ERROR_RECORD_CORRUPTED = -19 ,
  ROCPROFILER_STATUS_ERROR_INCORRECT_REPLAY_MODE = -20 , ROCPROFILER_STATUS_ERROR_SESSION_MISSING_FILTER = -21 , ROCPROFILER_STATUS_ERROR_INCORRECT_SIZE = -22 , ROCPROFILER_STATUS_ERROR_INCORRECT_FLUSH_INTERVAL = -23 ,
  ROCPROFILER_STATUS_ERROR_SESSION_FILTER_DATA_MISMATCH = -24 , ROCPROFILER_STATUS_ERROR_FILTER_DATA_CORRUPTED = -25 , ROCPROFILER_STATUS_ERROR_CORRUPTED_LABEL_DATA = -26 , ROCPROFILER_STATUS_ERROR_RANGE_STACK_IS_EMPTY = -27 ,
  ROCPROFILER_STATUS_ERROR_PASS_NOT_STARTED = -28 , ROCPROFILER_STATUS_ERROR_HAS_ACTIVE_SESSION = -29 , ROCPROFILER_STATUS_ERROR_SESSION_NOT_ACTIVE = -30 , ROCPROFILER_STATUS_ERROR_FILTER_NOT_FOUND = -31 ,
  ROCPROFILER_STATUS_ERROR_BUFFER_NOT_FOUND = -32 , ROCPROFILER_STATUS_ERROR_FILTER_NOT_SUPPORTED = -33
}
 ROCProfiler API status codes. More...
 
enum  rocprofiler_record_kind_t {
  ROCPROFILER_PROFILER_RECORD = 0 , ROCPROFILER_TRACER_RECORD = 1 , ROCPROFILER_ATT_TRACER_RECORD = 2 , ROCPROFILER_PC_SAMPLING_RECORD = 3 ,
  ROCPROFILER_SPM_RECORD = 4
}
 Record kind. More...
 
enum  rocprofiler_agent_type_t { ROCPROFILER_CPU_AGENT = 0 , ROCPROFILER_GPU_AGENT = 1 }
 Using rocprofiler_query_agent_info, user can determine the type of the agent the following struct will be the output in case of retrieving ROCPROFILER_AGENT_TYPE agent info. More...
 
enum  rocprofiler_agent_info_kind_t { ROCPROFILER_AGENT_NAME = 0 , ROCPROFILER_AGENT_TYPE = 1 }
 Types of information that can be requested about the Agents. More...
 
enum  rocprofiler_queue_info_kind_t { ROCPROFILER_QUEUE_SIZE = 0 }
 Types of information that can be requested about the Queues. More...
 
enum  rocprofiler_kernel_info_kind_t { ROCPROFILER_KERNEL_NAME = 0 }
 Kernel Information Types, can be used by rocprofiler_query_kernel_info. More...
 
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_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_tracer_roctx_api_data_info_t { ROCPROFILER_ROCTX_MESSAGE = 0 , ROCPROFILER_ROCTX_ID = 1 }
 ROCTX Tracer Data Information Kinds. More...
 
enum  rocprofiler_tracer_hsa_api_data_info_t { ROCPROFILER_HSA_FUNCTION_NAME = 0 , ROCPROFILER_HSA_API_DATA_STR = 1 , ROCPROFILER_HSA_ACTIVITY_NAME = 2 , ROCPROFILER_HSA_API_DATA = 3 }
 hsa Tracer Data Information Kinds More...
 
enum  rocprofiler_tracer_hip_api_data_info_t {
  ROCPROFILER_HIP_FUNCTION_NAME = 0 , ROCPROFILER_HIP_KERNEL_NAME = 1 , ROCPROFILER_HIP_MEM_COPY_SRC = 2 , ROCPROFILER_HIP_MEM_COPY_DST = 3 ,
  ROCPROFILER_HIP_MEM_COPY_SIZE = 4 , ROCPROFILER_HIP_API_DATA_STR = 5 , ROCPROFILER_HIP_ACTIVITY_NAME = 6 , ROCPROFILER_HIP_STREAM_ID = 7 ,
  ROCPROFILER_HIP_API_DATA = 8
}
 hip Tracer Data Information Kinds More...
 
enum  rocprofiler_buffer_property_kind_t { ROCPROFILER_BUFFER_PROPERTY_KIND_INTERVAL_FLUSH = 0 }
 Buffer Property Options. More...
 
enum  rocprofiler_replay_mode_t { ROCPROFILER_NONE_REPLAY_MODE = -1 , ROCPROFILER_APPLICATION_REPLAY_MODE = 0 , ROCPROFILER_KERNEL_REPLAY_MODE = 1 , ROCPROFILER_USER_REPLAY_MODE = 2 }
 Replay Profiling Modes. More...
 
enum  rocprofiler_filter_kind_t {
  ROCPROFILER_DISPATCH_TIMESTAMPS_COLLECTION = 1 , ROCPROFILER_COUNTERS_COLLECTION = 2 , ROCPROFILER_PC_SAMPLING_COLLECTION = 3 , ROCPROFILER_ATT_TRACE_COLLECTION = 4 ,
  ROCPROFILER_SPM_COLLECTION = 5 , ROCPROFILER_API_TRACE = 6
}
 
enum  rocprofiler_filter_property_kind_t {
  ROCPROFILER_FILTER_HSA_TRACER_API_FUNCTIONS = 1 , ROCPROFILER_FILTER_HIP_TRACER_API_FUNCTIONS = 2 , ROCPROFILER_FILTER_GPU_NAME = 3 , ROCPROFILER_FILTER_RANGE = 4 ,
  ROCPROFILER_FILTER_KERNEL_NAMES = 5
}
 Data Filter Types to be used by ::rocprofiler_session_set_filter to add filters to a specific session. More...
 
enum  rocprofiler_att_parameter_name_t {
  ROCPROFILER_ATT_COMPUTE_UNIT_TARGET = 0 , ROCPROFILER_ATT_VM_ID_MASK = 1 , ROCPROFILER_ATT_MASK = 2 , ROCPROFILER_ATT_TOKEN_MASK = 3 ,
  ROCPROFILER_ATT_TOKEN_MASK2 = 4 , ROCPROFILER_ATT_SE_MASK = 5 , ROCPROFILER_ATT_SAMPLE_RATE = 6 , ROCPROFILER_ATT_PERF_MASK = 240 ,
  ROCPROFILER_ATT_PERF_CTRL = 241 , ROCPROFILER_ATT_PERFCOUNTER = 242 , ROCPROFILER_ATT_PERFCOUNTER_NAME = 243 , ROCPROFILER_ATT_MAXVALUE
}
 
enum  rocprofiler_feature_kind_t { ROCPROFILER_FEATURE_KIND_METRIC = 0 , ROCPROFILER_FEATURE_KIND_TRACE = 1 , ROCPROFILER_FEATURE_KIND_SPM_MOD = 2 , ROCPROFILER_FEATURE_KIND_PCSMP_MOD = 4 }
 
enum  rocprofiler_data_kind_t {
  ROCPROFILER_DATA_KIND_UNINIT = 0 , ROCPROFILER_DATA_KIND_INT32 = 1 , ROCPROFILER_DATA_KIND_INT64 = 2 , ROCPROFILER_DATA_KIND_FLOAT = 3 ,
  ROCPROFILER_DATA_KIND_DOUBLE = 4 , ROCPROFILER_DATA_KIND_BYTES = 5
}
 
enum  rocprofiler_mode_t { ROCPROFILER_MODE_STANDALONE = 1 , ROCPROFILER_MODE_CREATEQUEUE = 2 , ROCPROFILER_MODE_SINGLEGROUP = 4 }
 
enum  rocprofiler_time_id_t {
  ROCPROFILER_TIME_ID_CLOCK_REALTIME = 0 , ROCPROFILER_TIME_ID_CLOCK_REALTIME_COARSE = 1 , ROCPROFILER_TIME_ID_CLOCK_MONOTONIC = 2 , ROCPROFILER_TIME_ID_CLOCK_MONOTONIC_COARSE = 3 ,
  ROCPROFILER_TIME_ID_CLOCK_MONOTONIC_RAW = 4
}
 
enum  rocprofiler_info_kind_t {
  ROCPROFILER_INFO_KIND_METRIC = 0 , ROCPROFILER_INFO_KIND_METRIC_COUNT = 1 , ROCPROFILER_INFO_KIND_TRACE = 2 , ROCPROFILER_INFO_KIND_TRACE_COUNT = 3 ,
  ROCPROFILER_INFO_KIND_TRACE_PARAMETER = 4 , ROCPROFILER_INFO_KIND_TRACE_PARAMETER_COUNT = 5
}
 
enum  rocprofiler_hsa_cb_id_t {
  ROCPROFILER_HSA_CB_ID_ALLOCATE = 0 , ROCPROFILER_HSA_CB_ID_DEVICE = 1 , ROCPROFILER_HSA_CB_ID_MEMCOPY = 2 , ROCPROFILER_HSA_CB_ID_SUBMIT = 3 ,
  ROCPROFILER_HSA_CB_ID_KSYMBOL = 4 , ROCPROFILER_HSA_CB_ID_CODEOBJ = 5
}
 

Functions

ROCPROFILER_API uint32_t rocprofiler_version_major ()
 Query the major version of the installed library. More...
 
ROCPROFILER_API uint32_t rocprofiler_version_minor ()
 Query the minor version of the installed library. More...
 
ROCPROFILER_API const char * rocprofiler_error_str (rocprofiler_status_t status) ROCPROFILER_VERSION_9_0
 Query the textual description of the given error for the current thread. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_initialize () ROCPROFILER_VERSION_9_0
 Initialize the API Tools. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_finalize () ROCPROFILER_VERSION_9_0
 Finalize the API Tools. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_get_timestamp (rocprofiler_timestamp_t *timestamp) ROCPROFILER_VERSION_9_0
 Get the system clock timestamp. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_agent_info_size (rocprofiler_agent_info_kind_t kind, rocprofiler_agent_id_t agent_id, size_t *data_size) ROCPROFILER_VERSION_9_0
 Query Agent Information size to allow the user to allocate the right size for the information data requested, the information will be collected using rocprofiler_agent_id_t to identify one type of information available in ::rocprofiler_agent_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_agent_info (rocprofiler_agent_info_kind_t kind, rocprofiler_agent_id_t descriptor, const char **name) ROCPROFILER_VERSION_9_0
 Query Agent Information Data using an allocated data pointer by the user, user can get the size of the data using rocprofiler_query_agent_info_size, the user can get the data using rocprofiler_agent_id_t and the user need to identify one type of information available in ::rocprofiler_agent_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_queue_info_size (rocprofiler_queue_info_kind_t kind, rocprofiler_queue_id_t agent_id, size_t *data_size) ROCPROFILER_VERSION_9_0
 Query Queue Information size to allow the user to allocate the right size for the information data requested, the information will be collected using rocprofiler_queue_id_t by using rocprofiler_query_queue_info and the user need to identify one type of information available in ::rocprofiler_queue_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_queue_info (rocprofiler_queue_info_kind_t kind, rocprofiler_queue_id_t descriptor, const char **name) ROCPROFILER_VERSION_9_0
 Query Queue Information Data using an allocated data pointer by the user, user can get the size of the data using rocprofiler_query_queue_info_size, the user can get the data using rocprofiler_queue_id_t and the user need to identify one type of information available in ::rocprofiler_queue_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_kernel_info_size (rocprofiler_kernel_info_kind_t kind, rocprofiler_kernel_id_t kernel_id, size_t *data_size) ROCPROFILER_VERSION_9_0
 Query Kernel Information Data size to allow the user to allocate the right size for the information data requested, the information will be collected using rocprofiler_kernel_id_t by using rocprofiler_query_kernel_info and the user need to identify one type of information available in ::rocprofiler_kernel_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_kernel_info (rocprofiler_kernel_info_kind_t kind, rocprofiler_kernel_id_t kernel_id, const char **data) ROCPROFILER_VERSION_9_0
 Query Kernel Information Data using an allocated data pointer by the user, user can get the size of the data using rocprofiler_query_kernel_info_size, the user can get the data using rocprofiler_kernel_id_t and the user need to identify one type of information available in ::rocprofiler_kernel_info_t. More...
 
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...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_roctx_tracer_api_data_info_size (rocprofiler_session_id_t session_id, rocprofiler_tracer_roctx_api_data_info_t kind, rocprofiler_tracer_api_data_handle_t api_data_id, rocprofiler_tracer_operation_id_t operation_id, size_t *data_size) ROCPROFILER_VERSION_9_0
 Query Tracer API Call Data Information size to allow the user to allocate the right size for the information data requested, the information will be collected using ::rocprofiler_tracer_api_data_id_t by using ::rocprofiler_query_tracer_api_data_info and the user need to identify one type of information available in ::rocprofiler_query_tracer_api_data_info. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_roctx_tracer_api_data_info (rocprofiler_session_id_t session_id, rocprofiler_tracer_roctx_api_data_info_t kind, rocprofiler_tracer_api_data_handle_t api_data_id, rocprofiler_tracer_operation_id_t operation_id, char **data) ROCPROFILER_VERSION_9_0
 Query API Data Information using an allocated data pointer by the user, user can get the size of the data using ::rocprofiler_query_tracer_api_data_info_length, the user can get the data using ::rocprofiler_tracer_api_data_id_t and the user need to identify one type of information available in ::rocprofiler_tracer_api_data_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_hsa_tracer_api_data_info_size (rocprofiler_session_id_t session_id, rocprofiler_tracer_hsa_api_data_info_t kind, rocprofiler_tracer_api_data_handle_t api_data_id, rocprofiler_tracer_operation_id_t operation_id, size_t *data_size) ROCPROFILER_VERSION_9_0
 Query Tracer API Call Data Information size to allow the user to allocate the right size for the information data requested, the information will be collected using ::rocprofiler_tracer_api_data_id_t by using ::rocprofiler_query_tracer_api_data_info and the user need to identify one type of information available in ::rocprofiler_query_tracer_api_data_info. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_hsa_tracer_api_data_info (rocprofiler_session_id_t session_id, rocprofiler_tracer_hsa_api_data_info_t kind, rocprofiler_tracer_api_data_handle_t api_data_id, rocprofiler_tracer_operation_id_t operation_id, char **data) ROCPROFILER_VERSION_9_0
 Query API Data Information using an allocated data pointer by the user, user can get the size of the data using ::rocprofiler_query_tracer_api_data_info_length, the user can get the data using ::rocprofiler_tracer_api_data_id_t and the user need to identify one type of information available in ::rocprofiler_tracer_api_data_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_hip_tracer_api_data_info_size (rocprofiler_session_id_t session_id, rocprofiler_tracer_hip_api_data_info_t kind, rocprofiler_tracer_api_data_handle_t api_data_id, rocprofiler_tracer_operation_id_t operation_id, size_t *data_size) ROCPROFILER_VERSION_9_0
 Query Tracer API Call Data Information size to allow the user to allocate the right size for the information data requested, the information will be collected using ::rocprofiler_tracer_api_data_id_t by using ::rocprofiler_query_tracer_api_data_info and the user need to identify one type of information available in ::rocprofiler_query_tracer_api_data_info. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_hip_tracer_api_data_info (rocprofiler_session_id_t session_id, rocprofiler_tracer_hip_api_data_info_t kind, rocprofiler_tracer_api_data_handle_t api_data_id, rocprofiler_tracer_operation_id_t operation_id, char **data) ROCPROFILER_VERSION_9_0
 Query API Data Information using an allocated data pointer by the user, user can get the size of the data using ::rocprofiler_query_tracer_api_data_info_length, the user can get the data using ::rocprofiler_tracer_api_data_id_t and the user need to identify one type of information available in ::rocprofiler_tracer_api_data_info_t. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_flush_data (rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
 Flush specific Buffer. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_next_record (const rocprofiler_record_header_t *record, const rocprofiler_record_header_t **next, rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
 Get a pointer to the next profiling record. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_session (rocprofiler_replay_mode_t replay_mode, rocprofiler_session_id_t *session_id) ROCPROFILER_VERSION_9_0
 Create Session A ROCProfiler Session is having enough information about what needs to be collected or traced and it allows the user to start/stop profiling/tracing whenever required. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_session (rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
 Destroy Session Destroy session created by rocprofiler_create_session, please refer to the samples for how to use. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_filter (rocprofiler_session_id_t session_id, rocprofiler_filter_kind_t filter_kind, rocprofiler_filter_data_t data, uint64_t data_count, rocprofiler_filter_id_t *filter_id, rocprofiler_filter_property_t property) ROCPROFILER_VERSION_9_0
 Create Session Filter This function will create filter and associate it with a specific session For every kind, one filter only is allowed per session. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_filter_buffer (rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
 Set Session Filter Buffer This function will associate buffer to a specific filter. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_api_trace_sync_callback (rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id, rocprofiler_sync_callback_t callback) ROCPROFILER_VERSION_9_0
 Set Session API Tracing Filter Synchronous Callback This function will associate buffer to a specific filter. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_filter (rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id) ROCPROFILER_VERSION_9_0
 Destroy Session Filter This function will destroy a specific filter. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_buffer (rocprofiler_session_id_t session_id, rocprofiler_buffer_callback_t buffer_callback, size_t buffer_size, rocprofiler_buffer_id_t *buffer_id) ROCPROFILER_VERSION_9_0
 Create Buffer This function will create a buffer that can be associated with a filter. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_buffer_properties (rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id, rocprofiler_buffer_property_t *buffer_properties, uint32_t buffer_properties_count) ROCPROFILER_VERSION_9_0
 Setting Buffer Properties This function will set buffer properties. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_buffer (rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
 Destroy Buffer This function will destroy a buffer given its id and session id. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_ready_session (rocprofiler_replay_mode_t replay_mode, rocprofiler_filter_kind_t filter_kind, rocprofiler_filter_data_t data, uint64_t data_count, size_t buffer_size, rocprofiler_buffer_callback_t buffer_callback, rocprofiler_session_id_t *session_id, rocprofiler_filter_property_t property, rocprofiler_sync_callback_t callback) ROCPROFILER_VERSION_9_0
 Create Ready Session A one call to create a ready profiling or tracing session, so that the session will be ready to collect counters with a one call to rocprofiler_start_session. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_start_session (rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
 Activate Session Activating session created by rocprofiler_create_session, please refer to the samples for how to use. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_terminate_session (rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
 Deactivate Session Deactivate session created by rocprofiler_create_session, please refer to the samples for how to use. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_push_range (const char *label) ROCPROFILER_VERSION_9_0
 Setting a label to a block range This can be used to label a range of code that is having active profiling session or labeling a pass. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_pop_range () ROCPROFILER_VERSION_9_0
 Setting an endpoint for a range This function can be used to set an endpoint to range labeled by rocprofiler_push_range. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_start_replay_pass () ROCPROFILER_VERSION_9_0
 Create and Start a pass A Pass is a block of code that can be replayed if required by the profiling/tracing and it mainly depends on the profiling data given in the rocprofiler_create_session. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_end_replay_pass () ROCPROFILER_VERSION_9_0
 End a pass End a pass created and started by ::rocprofiler_start_pass. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_create (const char **counter_names, uint64_t num_counters, rocprofiler_session_id_t *session_id, int cpu_index, int gpu_index) ROCPROFILER_VERSION_9_0
 Create a device profiling session. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_start (rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
 Start the device profiling session that was created previously. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_poll (rocprofiler_session_id_t session_id, rocprofiler_device_profile_metric_t *data) ROCPROFILER_VERSION_9_0
 Poll the device profiling session to read counters from the GPU device. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_stop (rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
 Stop the device profiling session that was created previously. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_destroy (rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
 Destroy the device profiling session that was created previously. More...
 
hsa_status_t rocprofiler_error_string (const char **str)
 
hsa_status_t rocprofiler_open (hsa_agent_t agent, rocprofiler_feature_t *features, uint32_t feature_count, rocprofiler_t **context, uint32_t mode, rocprofiler_properties_t *properties)
 
hsa_status_t rocprofiler_add_feature (const rocprofiler_feature_t *feature, rocprofiler_feature_set_t *features_set)
 
hsa_status_t rocprofiler_features_set_open (hsa_agent_t agent, rocprofiler_feature_set_t *features_set, rocprofiler_t **context, uint32_t mode, rocprofiler_properties_t *properties)
 
hsa_status_t rocprofiler_close (rocprofiler_t *context)
 
hsa_status_t rocprofiler_reset (rocprofiler_t *context, uint32_t group_index)
 
hsa_status_t rocprofiler_get_agent (rocprofiler_t *context, hsa_agent_t *agent)
 
hsa_status_t rocprofiler_get_time (rocprofiler_time_id_t time_id, uint64_t timestamp, uint64_t *value_ns, uint64_t *error_ns)
 
hsa_status_t rocprofiler_set_queue_callbacks (rocprofiler_queue_callbacks_t callbacks, void *data)
 
hsa_status_t rocprofiler_remove_queue_callbacks ()
 
hsa_status_t rocprofiler_start_queue_callbacks ()
 
hsa_status_t rocprofiler_stop_queue_callbacks ()
 
hsa_status_t rocprofiler_start (rocprofiler_t *context, uint32_t group_index)
 
hsa_status_t rocprofiler_stop (rocprofiler_t *context, uint32_t group_index)
 
hsa_status_t rocprofiler_read (rocprofiler_t *context, uint32_t group_index)
 
hsa_status_t rocprofiler_get_data (rocprofiler_t *context, uint32_t group_index)
 
hsa_status_t rocprofiler_group_count (const rocprofiler_t *context, uint32_t *group_count)
 
hsa_status_t rocprofiler_get_group (rocprofiler_t *context, uint32_t group_index, rocprofiler_group_t *group)
 
hsa_status_t rocprofiler_group_start (rocprofiler_group_t *group)
 
hsa_status_t rocprofiler_group_stop (rocprofiler_group_t *group)
 
hsa_status_t rocprofiler_group_read (rocprofiler_group_t *group)
 
hsa_status_t rocprofiler_group_get_data (rocprofiler_group_t *group)
 
hsa_status_t rocprofiler_get_metrics (const rocprofiler_t *context)
 
hsa_status_t rocprofiler_iterate_trace_data (rocprofiler_t *context, rocprofiler_trace_data_callback_t callback, void *data)
 
hsa_status_t rocprofiler_get_info (const hsa_agent_t *agent, rocprofiler_info_kind_t kind, void *data)
 
hsa_status_t rocprofiler_iterate_info (const hsa_agent_t *agent, rocprofiler_info_kind_t kind, hsa_status_t(*callback)(const rocprofiler_info_data_t info, void *data), void *data)
 
hsa_status_t rocprofiler_query_info (const hsa_agent_t *agent, rocprofiler_info_query_t query, hsa_status_t(*callback)(const rocprofiler_info_data_t info, void *data), void *data)
 
hsa_status_t rocprofiler_queue_create_profiled (hsa_agent_t agent_handle, uint32_t size, hsa_queue_type32_t type, void(*callback)(hsa_status_t status, hsa_queue_t *source, void *data), void *data, uint32_t private_segment_size, uint32_t group_segment_size, hsa_queue_t **queue)
 
hsa_status_t rocprofiler_pool_open (hsa_agent_t agent, rocprofiler_feature_t *features, uint32_t feature_count, rocprofiler_pool_t **pool, uint32_t mode, rocprofiler_pool_properties_t *)
 
hsa_status_t rocprofiler_pool_close (rocprofiler_pool_t *pool)
 
hsa_status_t rocprofiler_pool_fetch (rocprofiler_pool_t *pool, rocprofiler_pool_entry_t *entry)
 
hsa_status_t rocprofiler_pool_release (rocprofiler_pool_entry_t *entry)
 
hsa_status_t rocprofiler_pool_iterate (rocprofiler_pool_t *pool, hsa_status_t(*callback)(rocprofiler_pool_entry_t *entry, void *data), void *data)
 
hsa_status_t rocprofiler_pool_flush (rocprofiler_pool_t *pool)
 
hsa_status_t rocprofiler_set_hsa_callbacks (const rocprofiler_hsa_callbacks_t callbacks, void *arg)
 

Detailed Description

ROCPROFILER API interface.

Macro Definition Documentation

◆ ROCPROFILER_API

#define ROCPROFILER_API   ROCPROFILER_IMPORT

◆ ROCPROFILER_CALL

#define ROCPROFILER_CALL

◆ ROCPROFILER_EXPORT

#define ROCPROFILER_EXPORT   ROCPROFILER_EXPORT_DECORATOR ROCPROFILER_CALL

◆ ROCPROFILER_IMPORT

#define ROCPROFILER_IMPORT   ROCPROFILER_IMPORT_DECORATOR ROCPROFILER_CALL