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

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

rocprofiler: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocprofiler-docs/checkouts/docs-6.2.2/include/rocprofiler/rocprofiler.h File Reference
rocprofiler.h File Reference
#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_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_MAJOR   8
 
#define ROCPROFILER_VERSION_MINOR   0
 

Typedefs

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_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

uint32_t rocprofiler_version_major ()
 
uint32_t rocprofiler_version_minor ()
 
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)
 

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

◆ ROCPROFILER_VERSION_MAJOR

#define ROCPROFILER_VERSION_MAJOR   8

◆ ROCPROFILER_VERSION_MINOR

#define ROCPROFILER_VERSION_MINOR   0

Typedef Documentation

◆ rocprofiler_callback_t

typedef hsa_status_t(* rocprofiler_callback_t) (const rocprofiler_callback_data_t *callback_data, void *user_data, rocprofiler_group_t *group)

◆ rocprofiler_feature_set_t

◆ rocprofiler_handler_t

typedef bool(* rocprofiler_handler_t) (rocprofiler_group_t group, void *arg)

◆ rocprofiler_hsa_callback_fun_t

typedef hsa_status_t(* rocprofiler_hsa_callback_fun_t) (rocprofiler_hsa_cb_id_t id, const rocprofiler_hsa_callback_data_t *data, void *arg)

◆ rocprofiler_parameter_t

typedef hsa_ven_amd_aqlprofile_parameter_t rocprofiler_parameter_t

◆ rocprofiler_pool_handler_t

typedef bool(* rocprofiler_pool_handler_t) (const rocprofiler_pool_entry_t *entry, void *arg)

◆ rocprofiler_pool_t

typedef void rocprofiler_pool_t

◆ rocprofiler_t

typedef void rocprofiler_t

◆ rocprofiler_trace_data_callback_t

typedef hsa_ven_amd_aqlprofile_data_callback_t rocprofiler_trace_data_callback_t

Enumeration Type Documentation

◆ rocprofiler_data_kind_t

Enumerator
ROCPROFILER_DATA_KIND_UNINIT 
ROCPROFILER_DATA_KIND_INT32 
ROCPROFILER_DATA_KIND_INT64 
ROCPROFILER_DATA_KIND_FLOAT 
ROCPROFILER_DATA_KIND_DOUBLE 
ROCPROFILER_DATA_KIND_BYTES 

◆ rocprofiler_feature_kind_t

Enumerator
ROCPROFILER_FEATURE_KIND_METRIC 
ROCPROFILER_FEATURE_KIND_TRACE 
ROCPROFILER_FEATURE_KIND_SPM_MOD 
ROCPROFILER_FEATURE_KIND_PCSMP_MOD 

◆ rocprofiler_hsa_cb_id_t

Enumerator
ROCPROFILER_HSA_CB_ID_ALLOCATE 
ROCPROFILER_HSA_CB_ID_DEVICE 
ROCPROFILER_HSA_CB_ID_MEMCOPY 
ROCPROFILER_HSA_CB_ID_SUBMIT 
ROCPROFILER_HSA_CB_ID_KSYMBOL 
ROCPROFILER_HSA_CB_ID_CODEOBJ 

◆ rocprofiler_info_kind_t

Enumerator
ROCPROFILER_INFO_KIND_METRIC 
ROCPROFILER_INFO_KIND_METRIC_COUNT 
ROCPROFILER_INFO_KIND_TRACE 
ROCPROFILER_INFO_KIND_TRACE_COUNT 
ROCPROFILER_INFO_KIND_TRACE_PARAMETER 
ROCPROFILER_INFO_KIND_TRACE_PARAMETER_COUNT 

◆ rocprofiler_mode_t

Enumerator
ROCPROFILER_MODE_STANDALONE 
ROCPROFILER_MODE_CREATEQUEUE 
ROCPROFILER_MODE_SINGLEGROUP 

◆ rocprofiler_time_id_t

Enumerator
ROCPROFILER_TIME_ID_CLOCK_REALTIME 
ROCPROFILER_TIME_ID_CLOCK_REALTIME_COARSE 
ROCPROFILER_TIME_ID_CLOCK_MONOTONIC 
ROCPROFILER_TIME_ID_CLOCK_MONOTONIC_COARSE 
ROCPROFILER_TIME_ID_CLOCK_MONOTONIC_RAW 

Function Documentation

◆ rocprofiler_add_feature()

hsa_status_t rocprofiler_add_feature ( const rocprofiler_feature_t feature,
rocprofiler_feature_set_t features_set 
)

◆ rocprofiler_close()

hsa_status_t rocprofiler_close ( rocprofiler_t context)

◆ rocprofiler_error_string()

hsa_status_t rocprofiler_error_string ( const char **  str)

◆ rocprofiler_features_set_open()

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 
)

◆ rocprofiler_get_agent()

hsa_status_t rocprofiler_get_agent ( rocprofiler_t context,
hsa_agent_t *  agent 
)

◆ rocprofiler_get_data()

hsa_status_t rocprofiler_get_data ( rocprofiler_t context,
uint32_t  group_index 
)

◆ rocprofiler_get_group()

hsa_status_t rocprofiler_get_group ( rocprofiler_t context,
uint32_t  group_index,
rocprofiler_group_t group 
)

◆ rocprofiler_get_info()

hsa_status_t rocprofiler_get_info ( const hsa_agent_t *  agent,
rocprofiler_info_kind_t  kind,
void *  data 
)

◆ rocprofiler_get_metrics()

hsa_status_t rocprofiler_get_metrics ( const rocprofiler_t context)

◆ rocprofiler_get_time()

hsa_status_t rocprofiler_get_time ( rocprofiler_time_id_t  time_id,
uint64_t  timestamp,
uint64_t *  value_ns,
uint64_t *  error_ns 
)

◆ rocprofiler_group_count()

hsa_status_t rocprofiler_group_count ( const rocprofiler_t context,
uint32_t *  group_count 
)

◆ rocprofiler_group_get_data()

hsa_status_t rocprofiler_group_get_data ( rocprofiler_group_t group)

◆ rocprofiler_group_read()

hsa_status_t rocprofiler_group_read ( rocprofiler_group_t group)

◆ rocprofiler_group_start()

hsa_status_t rocprofiler_group_start ( rocprofiler_group_t group)

◆ rocprofiler_group_stop()

hsa_status_t rocprofiler_group_stop ( rocprofiler_group_t group)

◆ rocprofiler_iterate_info()

hsa_status_t rocprofiler_iterate_info ( const hsa_agent_t *  agent,
rocprofiler_info_kind_t  kind,
hsa_status_t(*)(const rocprofiler_info_data_t info, void *data)  callback,
void *  data 
)

◆ rocprofiler_iterate_trace_data()

hsa_status_t rocprofiler_iterate_trace_data ( rocprofiler_t context,
rocprofiler_trace_data_callback_t  callback,
void *  data 
)

◆ rocprofiler_open()

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 
)

◆ rocprofiler_pool_close()

hsa_status_t rocprofiler_pool_close ( rocprofiler_pool_t pool)

◆ rocprofiler_pool_fetch()

hsa_status_t rocprofiler_pool_fetch ( rocprofiler_pool_t pool,
rocprofiler_pool_entry_t entry 
)

◆ rocprofiler_pool_flush()

hsa_status_t rocprofiler_pool_flush ( rocprofiler_pool_t pool)

◆ rocprofiler_pool_iterate()

hsa_status_t rocprofiler_pool_iterate ( rocprofiler_pool_t pool,
hsa_status_t(*)(rocprofiler_pool_entry_t *entry, void *data)  callback,
void *  data 
)

◆ rocprofiler_pool_open()

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  
)

◆ rocprofiler_pool_release()

hsa_status_t rocprofiler_pool_release ( rocprofiler_pool_entry_t entry)

◆ rocprofiler_query_info()

hsa_status_t rocprofiler_query_info ( const hsa_agent_t *  agent,
rocprofiler_info_query_t  query,
hsa_status_t(*)(const rocprofiler_info_data_t info, void *data)  callback,
void *  data 
)

◆ rocprofiler_queue_create_profiled()

hsa_status_t rocprofiler_queue_create_profiled ( hsa_agent_t  agent_handle,
uint32_t  size,
hsa_queue_type32_t  type,
void(*)(hsa_status_t status, hsa_queue_t *source, void *data)  callback,
void *  data,
uint32_t  private_segment_size,
uint32_t  group_segment_size,
hsa_queue_t **  queue 
)

◆ rocprofiler_read()

hsa_status_t rocprofiler_read ( rocprofiler_t context,
uint32_t  group_index 
)

◆ rocprofiler_remove_queue_callbacks()

hsa_status_t rocprofiler_remove_queue_callbacks ( )

◆ rocprofiler_reset()

hsa_status_t rocprofiler_reset ( rocprofiler_t context,
uint32_t  group_index 
)

◆ rocprofiler_set_hsa_callbacks()

hsa_status_t rocprofiler_set_hsa_callbacks ( const rocprofiler_hsa_callbacks_t  callbacks,
void *  arg 
)

◆ rocprofiler_set_queue_callbacks()

hsa_status_t rocprofiler_set_queue_callbacks ( rocprofiler_queue_callbacks_t  callbacks,
void *  data 
)

◆ rocprofiler_start()

hsa_status_t rocprofiler_start ( rocprofiler_t context,
uint32_t  group_index 
)

◆ rocprofiler_start_queue_callbacks()

hsa_status_t rocprofiler_start_queue_callbacks ( )

◆ rocprofiler_stop()

hsa_status_t rocprofiler_stop ( rocprofiler_t context,
uint32_t  group_index 
)

◆ rocprofiler_stop_queue_callbacks()

hsa_status_t rocprofiler_stop_queue_callbacks ( )

◆ rocprofiler_version_major()

uint32_t rocprofiler_version_major ( )

◆ rocprofiler_version_minor()

uint32_t rocprofiler_version_minor ( )