Remove _service from rocprofiler_service_* types (#221)
- this is a continuation of #168 which removed _SERVICE from the ROCPROFILER_SERVICE_ enums
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cf5e4b4b1b
Коммит
ca296ff22b
@@ -88,9 +88,9 @@ struct source_location
|
||||
};
|
||||
|
||||
using call_stack_t = std::vector<source_location>;
|
||||
using buffer_kind_names_t = std::map<rocprofiler_service_buffer_tracing_kind_t, const char*>;
|
||||
using buffer_kind_names_t = std::map<rocprofiler_buffer_tracing_kind_t, const char*>;
|
||||
using buffer_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_buffer_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
std::map<rocprofiler_buffer_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
using kernel_symbol_data_t = rocprofiler_callback_tracing_code_object_kernel_symbol_register_data_t;
|
||||
using kernel_symbol_map_t = std::unordered_map<rocprofiler_kernel_id_t, kernel_symbol_data_t>;
|
||||
|
||||
@@ -160,7 +160,7 @@ get_buffer_tracing_names()
|
||||
// callback for each kind operation
|
||||
//
|
||||
static auto tracing_kind_operation_cb =
|
||||
[](rocprofiler_service_buffer_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
[](rocprofiler_buffer_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
auto* name_info_v = static_cast<buffer_name_info*>(data_v);
|
||||
|
||||
if(kindv == ROCPROFILER_BUFFER_TRACING_HSA_API)
|
||||
@@ -177,7 +177,7 @@ get_buffer_tracing_names()
|
||||
//
|
||||
// callback for each buffer kind (i.e. domain)
|
||||
//
|
||||
static auto tracing_kind_cb = [](rocprofiler_service_buffer_tracing_kind_t kind, void* data) {
|
||||
static auto tracing_kind_cb = [](rocprofiler_buffer_tracing_kind_t kind, void* data) {
|
||||
// store the buffer kind name
|
||||
auto* name_info_v = static_cast<buffer_name_info*>(data);
|
||||
const char* name = nullptr;
|
||||
|
||||
@@ -82,9 +82,9 @@ struct source_location
|
||||
};
|
||||
|
||||
using call_stack_t = std::vector<source_location>;
|
||||
using callback_kind_names_t = std::map<rocprofiler_service_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_names_t = std::map<rocprofiler_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
std::map<rocprofiler_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
|
||||
struct callback_name_info
|
||||
{
|
||||
@@ -150,7 +150,7 @@ get_callback_id_names()
|
||||
// callback for each kind operation
|
||||
//
|
||||
static auto tracing_kind_operation_cb =
|
||||
[](rocprofiler_service_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
[](rocprofiler_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data_v);
|
||||
|
||||
if(kindv == ROCPROFILER_CALLBACK_TRACING_HSA_API)
|
||||
@@ -167,7 +167,7 @@ get_callback_id_names()
|
||||
//
|
||||
// callback for each callback kind (i.e. domain)
|
||||
//
|
||||
static auto tracing_kind_cb = [](rocprofiler_service_callback_tracing_kind_t kind, void* data) {
|
||||
static auto tracing_kind_cb = [](rocprofiler_callback_tracing_kind_t kind, void* data) {
|
||||
// store the callback kind name
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data);
|
||||
const char* name = nullptr;
|
||||
@@ -211,7 +211,7 @@ tool_tracing_callback(rocprofiler_callback_tracing_record_t record,
|
||||
<< ", operation=" << std::setw(3) << record.operation << ", phase=" << record.phase
|
||||
<< ", dt_nsec=" << std::setw(6) << dt;
|
||||
|
||||
auto info_data_cb = [](rocprofiler_service_callback_tracing_kind_t,
|
||||
auto info_data_cb = [](rocprofiler_callback_tracing_kind_t,
|
||||
uint32_t,
|
||||
uint32_t arg_num,
|
||||
const char* arg_name,
|
||||
|
||||
@@ -82,9 +82,9 @@ struct source_location
|
||||
};
|
||||
|
||||
using call_stack_t = std::vector<source_location>;
|
||||
using callback_kind_names_t = std::map<rocprofiler_service_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_names_t = std::map<rocprofiler_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
std::map<rocprofiler_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
using wrap_count_t = std::pair<source_location, size_t>;
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
|
||||
@@ -40,13 +40,13 @@ ROCPROFILER_EXTERN_C_INIT
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_tracing_operation_t operation; // rocprofiler/hsa.h
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_tracing_operation_t operation; // rocprofiler/hsa.h
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
} rocprofiler_buffer_tracing_hsa_api_record_t;
|
||||
|
||||
/**
|
||||
@@ -54,13 +54,13 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_tracing_operation_t operation; // rocprofiler/hip.h
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_tracing_operation_t operation; // rocprofiler/hip.h
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
} rocprofiler_buffer_tracing_hip_api_record_t;
|
||||
|
||||
/**
|
||||
@@ -68,13 +68,13 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_tracing_operation_t operation; // rocprofiler/marker.h
|
||||
rocprofiler_timestamp_t timestamp;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
uint64_t marker_id; // rocprofiler_marker_id_t
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_tracing_operation_t operation; // rocprofiler/marker.h
|
||||
rocprofiler_timestamp_t timestamp;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
uint64_t marker_id; // rocprofiler_marker_id_t
|
||||
// const char* message; // (Need Review?)
|
||||
} rocprofiler_buffer_tracing_marker_record_t;
|
||||
|
||||
@@ -83,14 +83,14 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_agent_id_t agent_id;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
rocprofiler_kernel_id_t kernel_id;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_agent_id_t agent_id;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
rocprofiler_kernel_id_t kernel_id;
|
||||
} rocprofiler_buffer_tracing_memory_copy_record_t;
|
||||
|
||||
/**
|
||||
@@ -98,18 +98,18 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_agent_id_t agent_id;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
rocprofiler_kernel_id_t kernel_id;
|
||||
uint32_t private_segment_size;
|
||||
uint32_t group_segment_size;
|
||||
rocprofiler_dim3_t workgroup_size;
|
||||
rocprofiler_dim3_t grid_size;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_agent_id_t agent_id;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
rocprofiler_kernel_id_t kernel_id;
|
||||
uint32_t private_segment_size;
|
||||
uint32_t group_segment_size;
|
||||
rocprofiler_dim3_t workgroup_size;
|
||||
rocprofiler_dim3_t grid_size;
|
||||
} rocprofiler_buffer_tracing_kernel_dispatch_record_t;
|
||||
|
||||
/**
|
||||
@@ -117,12 +117,12 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
// Not Sure What is the info needed here?
|
||||
} rocprofiler_buffer_tracing_page_migration_record_t;
|
||||
|
||||
@@ -131,12 +131,12 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
// Not Sure What is the info needed here?
|
||||
} rocprofiler_buffer_tracing_scratch_memory_record_t;
|
||||
|
||||
@@ -145,12 +145,12 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_timestamp_t start_timestamp;
|
||||
rocprofiler_timestamp_t end_timestamp;
|
||||
rocprofiler_queue_id_t queue_id;
|
||||
// Not Sure What is the info needed here?
|
||||
} rocprofiler_buffer_tracing_queue_scheduling_record_t;
|
||||
|
||||
@@ -209,27 +209,27 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t size;
|
||||
rocprofiler_service_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
uint64_t size;
|
||||
rocprofiler_buffer_tracing_kind_t kind;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
} rocprofiler_buffer_tracing_correlation_record_t;
|
||||
|
||||
/**
|
||||
* @brief Callback function for mapping @ref rocprofiler_service_buffer_tracing_kind_t ids to
|
||||
* @brief Callback function for mapping @ref rocprofiler_buffer_tracing_kind_t ids to
|
||||
* string names. @see rocprofiler_iterate_buffer_trace_kind_names.
|
||||
*/
|
||||
typedef int (*rocprofiler_buffer_tracing_kind_cb_t)(rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
void* data);
|
||||
typedef int (*rocprofiler_buffer_tracing_kind_cb_t)(rocprofiler_buffer_tracing_kind_t kind,
|
||||
void* data);
|
||||
|
||||
/**
|
||||
* @brief Callback function for mapping the operations of a given @ref
|
||||
* rocprofiler_service_buffer_tracing_kind_t to string names. @see
|
||||
* rocprofiler_buffer_tracing_kind_t to string names. @see
|
||||
* rocprofiler_iterate_buffer_trace_kind_operation_names.
|
||||
*/
|
||||
typedef int (*rocprofiler_buffer_tracing_kind_operation_cb_t)(
|
||||
rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
void* data);
|
||||
rocprofiler_buffer_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
void* data);
|
||||
|
||||
/**
|
||||
* @brief Configure Buffer Tracing Service.
|
||||
@@ -243,11 +243,11 @@ typedef int (*rocprofiler_buffer_tracing_kind_operation_cb_t)(
|
||||
*
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_configure_buffer_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_buffer_id_t buffer_id);
|
||||
rocprofiler_configure_buffer_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_buffer_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_buffer_id_t buffer_id);
|
||||
|
||||
/**
|
||||
* @brief Query the name of the buffer tracing kind. The name retrieved from this function is a
|
||||
@@ -266,8 +266,8 @@ rocprofiler_configure_buffer_tracing_service(rocprofiler_context_id_t
|
||||
* constant string or not.
|
||||
*/
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_buffer_tracing_kind_name(rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
const char** name,
|
||||
rocprofiler_query_buffer_tracing_kind_name(rocprofiler_buffer_tracing_kind_t kind,
|
||||
const char** name,
|
||||
uint64_t* name_len) ROCPROFILER_API;
|
||||
|
||||
/**
|
||||
@@ -292,10 +292,10 @@ rocprofiler_query_buffer_tracing_kind_name(rocprofiler_service_buffer_tracing_ki
|
||||
* constant string or not.
|
||||
*/
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_buffer_tracing_kind_operation_name(rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len) ROCPROFILER_API;
|
||||
rocprofiler_query_buffer_tracing_kind_operation_name(rocprofiler_buffer_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len) ROCPROFILER_API;
|
||||
|
||||
/**
|
||||
* @brief Iterate over all the mappings of the buffer tracing kinds and get a buffer with the id
|
||||
@@ -304,7 +304,7 @@ rocprofiler_query_buffer_tracing_kind_operation_name(rocprofiler_service_buffer_
|
||||
* in the client instead of making multiple on-demand calls.
|
||||
*
|
||||
* @param [in] callback Callback function invoked for each enumeration value in @ref
|
||||
* rocprofiler_service_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* rocprofiler_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* @param [in] data User data passed back into the callback
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
@@ -313,18 +313,18 @@ rocprofiler_iterate_buffer_tracing_kinds(rocprofiler_buffer_tracing_kind_cb_t ca
|
||||
|
||||
/**
|
||||
* @brief Iterates over all the operations for a given @ref
|
||||
* rocprofiler_service_buffer_tracing_kind_t and invokes the callback with the kind and operation
|
||||
* rocprofiler_buffer_tracing_kind_t and invokes the callback with the kind and operation
|
||||
* id. This is useful to build a map of the operation names during tool initialization instead of
|
||||
* querying rocprofiler everytime in the callback hotpath.
|
||||
*
|
||||
* @param [in] kind which buffer tracing kind operations to iterate over
|
||||
* @param [in] callback Callback function invoked for each operation associated with @ref
|
||||
* rocprofiler_service_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* rocprofiler_buffer_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* @param [in] data User data passed back into the callback
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_iterate_buffer_tracing_kind_operations(
|
||||
rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
rocprofiler_buffer_tracing_kind_t kind,
|
||||
rocprofiler_buffer_tracing_kind_operation_cb_t callback,
|
||||
void* data) ROCPROFILER_NONNULL(2);
|
||||
|
||||
|
||||
@@ -169,22 +169,21 @@ typedef void (*rocprofiler_callback_tracing_cb_t)(rocprofiler_callback_tracing_r
|
||||
void* callback_data) ROCPROFILER_NONNULL(2);
|
||||
|
||||
/**
|
||||
* @brief Callback function for mapping @ref rocprofiler_service_callback_tracing_kind_t ids to
|
||||
* @brief Callback function for mapping @ref rocprofiler_callback_tracing_kind_t ids to
|
||||
* string names. @see rocprofiler_iterate_callback_tracing_kind_names.
|
||||
*/
|
||||
typedef int (*rocprofiler_callback_tracing_kind_cb_t)(
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
void* data);
|
||||
typedef int (*rocprofiler_callback_tracing_kind_cb_t)(rocprofiler_callback_tracing_kind_t kind,
|
||||
void* data);
|
||||
|
||||
/**
|
||||
* @brief Callback function for mapping the operations of a given @ref
|
||||
* rocprofiler_service_callback_tracing_kind_t to string names. @see
|
||||
* rocprofiler_callback_tracing_kind_t to string names. @see
|
||||
* rocprofiler_iterate_callback_tracing_kind_operation_names.
|
||||
*/
|
||||
typedef int (*rocprofiler_callback_tracing_kind_operation_cb_t)(
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
void* data);
|
||||
rocprofiler_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
void* data);
|
||||
|
||||
/**
|
||||
* @brief Callback function for iterating over the function arguments to a traced function.
|
||||
@@ -200,19 +199,19 @@ typedef int (*rocprofiler_callback_tracing_kind_operation_cb_t)(
|
||||
* @param [in] data user data
|
||||
*/
|
||||
typedef int (*rocprofiler_callback_tracing_operation_args_cb_t)(
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
uint32_t arg_number,
|
||||
const char* arg_name,
|
||||
const char* arg_value_str,
|
||||
const void* const arg_value_addr,
|
||||
void* data);
|
||||
rocprofiler_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
uint32_t arg_number,
|
||||
const char* arg_name,
|
||||
const char* arg_value_str,
|
||||
const void* const arg_value_addr,
|
||||
void* data);
|
||||
|
||||
/**
|
||||
* @brief Configure Callback Tracing Service. The callback tracing service provides two synchronous
|
||||
* callbacks around an API function on the same thread as the application which is invoking the API
|
||||
* function. This function can only be invoked once per @ref
|
||||
* rocprofiler_service_callback_tracing_kind_t value, i.e. it can be invoked once for the HSA API,
|
||||
* rocprofiler_callback_tracing_kind_t value, i.e. it can be invoked once for the HSA API,
|
||||
* once for the HIP API, and so on but it will fail if it is invoked for the HSA API twice. Please
|
||||
* note, the callback API does have the potentially non-trivial overhead of copying the function
|
||||
* arguments into the record. If you are willing to let rocprofiler record the timestamps, do not
|
||||
@@ -233,17 +232,17 @@ typedef int (*rocprofiler_callback_tracing_operation_args_cb_t)(
|
||||
* rocprofiler_configure function
|
||||
* @retval ::ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND The provided context is not valid/registered
|
||||
* @retval ::ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED if the same @ref
|
||||
* rocprofiler_service_callback_tracing_kind_t value is provided more than once (per context) -- in
|
||||
* rocprofiler_callback_tracing_kind_t value is provided more than once (per context) -- in
|
||||
* other words, we do not support overriding or combining the operations in separate function calls.
|
||||
*
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_callback_tracing_cb_t callback,
|
||||
void* callback_args);
|
||||
rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_callback_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_callback_tracing_cb_t callback,
|
||||
void* callback_args);
|
||||
|
||||
/**
|
||||
* @brief Query the name of the callback tracing kind. The name retrieved from this function is a
|
||||
@@ -259,8 +258,8 @@ rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_
|
||||
* @return ::rocprofiler_status_t
|
||||
*/
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_callback_tracing_kind_name(rocprofiler_service_callback_tracing_kind_t kind,
|
||||
const char** name,
|
||||
rocprofiler_query_callback_tracing_kind_name(rocprofiler_callback_tracing_kind_t kind,
|
||||
const char** name,
|
||||
uint64_t* name_len) ROCPROFILER_API;
|
||||
|
||||
/**
|
||||
@@ -281,18 +280,17 @@ rocprofiler_query_callback_tracing_kind_name(rocprofiler_service_callback_tracin
|
||||
* string or not.
|
||||
*/
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_callback_tracing_kind_operation_name(
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len) ROCPROFILER_API;
|
||||
rocprofiler_query_callback_tracing_kind_operation_name(rocprofiler_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len) ROCPROFILER_API;
|
||||
|
||||
/**
|
||||
* @brief Iterate over all the mappings of the callback tracing kinds and get a callback for each
|
||||
* kind.
|
||||
*
|
||||
* @param [in] callback Callback function invoked for each enumeration value in @ref
|
||||
* rocprofiler_service_callback_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* rocprofiler_callback_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* @param [in] data User data passed back into the callback
|
||||
* @return ::rocprofiler_status_t
|
||||
*/
|
||||
@@ -302,12 +300,12 @@ rocprofiler_iterate_callback_tracing_kinds(rocprofiler_callback_tracing_kind_cb_
|
||||
|
||||
/**
|
||||
* @brief Iterates over all the mappings of the operations for a given @ref
|
||||
* rocprofiler_service_callback_tracing_kind_t and invokes the callback with the kind id, operation
|
||||
* rocprofiler_callback_tracing_kind_t and invokes the callback with the kind id, operation
|
||||
* id, and user-provided data.
|
||||
*
|
||||
* @param [in] kind which tracing callback kind operations to iterate over
|
||||
* @param [in] callback Callback function invoked for each operation associated with @ref
|
||||
* rocprofiler_service_callback_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* rocprofiler_callback_tracing_kind_t with the exception of the `NONE` and `LAST` values.
|
||||
* @param [in] data User data passed back into the callback
|
||||
* @return ::rocprofiler_status_t
|
||||
* @retval ::ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND Invalid domain id
|
||||
@@ -315,7 +313,7 @@ rocprofiler_iterate_callback_tracing_kinds(rocprofiler_callback_tracing_kind_cb_
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_iterate_callback_tracing_kind_operations(
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
rocprofiler_callback_tracing_kind_t kind,
|
||||
rocprofiler_callback_tracing_kind_operation_cb_t callback,
|
||||
void* data) ROCPROFILER_NONNULL(2);
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ typedef enum // NOLINT(performance-enum-size)
|
||||
ROCPROFILER_CALLBACK_TRACING_CODE_OBJECT, ///< Callbacks for code object info
|
||||
ROCPROFILER_CALLBACK_TRACING_KERNEL_DISPATCH, ///< Callbacks for kernel dispatches
|
||||
ROCPROFILER_CALLBACK_TRACING_LAST,
|
||||
} rocprofiler_service_callback_tracing_kind_t;
|
||||
} rocprofiler_callback_tracing_kind_t;
|
||||
|
||||
/**
|
||||
* @brief Service Buffer Tracing Kind.
|
||||
@@ -146,7 +146,7 @@ typedef enum // NOLINT(performance-enum-size)
|
||||
// To determine if this is possible to implement?
|
||||
// ROCPROFILER_BUFFER_TRACING_QUEUE_SCHEDULING,
|
||||
ROCPROFILER_BUFFER_TRACING_LAST,
|
||||
} rocprofiler_service_buffer_tracing_kind_t;
|
||||
} rocprofiler_buffer_tracing_kind_t;
|
||||
|
||||
/**
|
||||
* @brief ROCProfiler Code Object Tracer Operation.
|
||||
@@ -368,13 +368,13 @@ typedef struct rocprofiler_dim3_t
|
||||
*/
|
||||
typedef struct rocprofiler_callback_tracing_record_t
|
||||
{
|
||||
rocprofiler_context_id_t context_id;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_service_callback_tracing_kind_t kind;
|
||||
uint32_t operation;
|
||||
rocprofiler_callback_phase_t phase;
|
||||
void* payload;
|
||||
rocprofiler_context_id_t context_id;
|
||||
rocprofiler_thread_id_t thread_id;
|
||||
rocprofiler_correlation_id_t correlation_id;
|
||||
rocprofiler_callback_tracing_kind_t kind;
|
||||
uint32_t operation;
|
||||
rocprofiler_callback_phase_t phase;
|
||||
void* payload;
|
||||
} rocprofiler_callback_tracing_record_t;
|
||||
|
||||
/**
|
||||
@@ -427,7 +427,7 @@ typedef struct
|
||||
*
|
||||
* @param [in] category a value from @ref rocprofiler_buffer_category_t
|
||||
* @param [in] kind depending on the category, this is the domain value, e.g., @ref
|
||||
* rocprofiler_service_buffer_tracing_kind_t value
|
||||
* rocprofiler_buffer_tracing_kind_t value
|
||||
* @return uint64_t hash value of category and kind
|
||||
*/
|
||||
static inline uint64_t
|
||||
|
||||
@@ -69,7 +69,7 @@ ROCPROFILER_BUFFER_TRACING_KIND_STRING(EXTERNAL_CORRELATION)
|
||||
|
||||
template <size_t Idx, size_t... Tail>
|
||||
std::pair<const char*, size_t>
|
||||
get_kind_name(rocprofiler_service_buffer_tracing_kind_t kind, std::index_sequence<Idx, Tail...>)
|
||||
get_kind_name(rocprofiler_buffer_tracing_kind_t kind, std::index_sequence<Idx, Tail...>)
|
||||
{
|
||||
if(kind == Idx) return buffer_tracing_kind_string<Idx>::value;
|
||||
// recursion until tail empty
|
||||
@@ -82,11 +82,11 @@ get_kind_name(rocprofiler_service_buffer_tracing_kind_t kind, std::index_sequenc
|
||||
|
||||
extern "C" {
|
||||
rocprofiler_status_t
|
||||
rocprofiler_configure_buffer_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_buffer_id_t buffer_id)
|
||||
rocprofiler_configure_buffer_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_buffer_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_buffer_id_t buffer_id)
|
||||
{
|
||||
if(rocprofiler::registration::get_init_status() > -1)
|
||||
return ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED;
|
||||
@@ -126,9 +126,9 @@ rocprofiler_configure_buffer_tracing_service(rocprofiler_context_id_t
|
||||
}
|
||||
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_buffer_tracing_kind_name(rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
rocprofiler_query_buffer_tracing_kind_name(rocprofiler_buffer_tracing_kind_t kind,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
{
|
||||
auto&& val = rocprofiler::buffer_tracing::get_kind_name(
|
||||
kind, std::make_index_sequence<ROCPROFILER_BUFFER_TRACING_LAST>{});
|
||||
@@ -140,10 +140,10 @@ rocprofiler_query_buffer_tracing_kind_name(rocprofiler_service_buffer_tracing_ki
|
||||
}
|
||||
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_buffer_tracing_kind_operation_name(rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
rocprofiler_query_buffer_tracing_kind_operation_name(rocprofiler_buffer_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
{
|
||||
if(kind < ROCPROFILER_BUFFER_TRACING_NONE || kind >= ROCPROFILER_BUFFER_TRACING_LAST)
|
||||
return ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND;
|
||||
@@ -174,7 +174,7 @@ rocprofiler_iterate_buffer_tracing_kinds(rocprofiler_buffer_tracing_kind_cb_t ca
|
||||
{
|
||||
for(uint32_t i = 0; i < ROCPROFILER_BUFFER_TRACING_LAST; ++i)
|
||||
{
|
||||
auto _success = callback(static_cast<rocprofiler_service_buffer_tracing_kind_t>(i), data);
|
||||
auto _success = callback(static_cast<rocprofiler_buffer_tracing_kind_t>(i), data);
|
||||
if(_success != 0) break;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ rocprofiler_iterate_buffer_tracing_kinds(rocprofiler_buffer_tracing_kind_cb_t ca
|
||||
|
||||
rocprofiler_status_t
|
||||
rocprofiler_iterate_buffer_tracing_kind_operations(
|
||||
rocprofiler_service_buffer_tracing_kind_t kind,
|
||||
rocprofiler_buffer_tracing_kind_t kind,
|
||||
rocprofiler_buffer_tracing_kind_operation_cb_t callback,
|
||||
void* data)
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ ROCPROFILER_CALLBACK_TRACING_KIND_STRING(KERNEL_DISPATCH)
|
||||
|
||||
template <size_t Idx, size_t... Tail>
|
||||
std::pair<const char*, size_t>
|
||||
get_kind_name(rocprofiler_service_callback_tracing_kind_t kind, std::index_sequence<Idx, Tail...>)
|
||||
get_kind_name(rocprofiler_callback_tracing_kind_t kind, std::index_sequence<Idx, Tail...>)
|
||||
{
|
||||
if(kind == Idx) return callback_tracing_kind_string<Idx>::value;
|
||||
// recursion until tail empty
|
||||
@@ -78,12 +78,12 @@ get_kind_name(rocprofiler_service_callback_tracing_kind_t kind, std::index_seque
|
||||
|
||||
extern "C" {
|
||||
rocprofiler_status_t
|
||||
rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_callback_tracing_cb_t callback,
|
||||
void* callback_args)
|
||||
rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_id,
|
||||
rocprofiler_callback_tracing_kind_t kind,
|
||||
rocprofiler_tracing_operation_t* operations,
|
||||
size_t operations_count,
|
||||
rocprofiler_callback_tracing_cb_t callback,
|
||||
void* callback_args)
|
||||
{
|
||||
if(rocprofiler::registration::get_init_status() > -1)
|
||||
return ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED;
|
||||
@@ -117,9 +117,9 @@ rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_
|
||||
}
|
||||
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_callback_tracing_kind_name(rocprofiler_service_callback_tracing_kind_t kind,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
rocprofiler_query_callback_tracing_kind_name(rocprofiler_callback_tracing_kind_t kind,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
{
|
||||
auto&& val = rocprofiler::callback_tracing::get_kind_name(
|
||||
kind, std::make_index_sequence<ROCPROFILER_CALLBACK_TRACING_LAST>{});
|
||||
@@ -131,11 +131,10 @@ rocprofiler_query_callback_tracing_kind_name(rocprofiler_service_callback_tracin
|
||||
}
|
||||
|
||||
rocprofiler_status_t
|
||||
rocprofiler_query_callback_tracing_kind_operation_name(
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
rocprofiler_query_callback_tracing_kind_operation_name(rocprofiler_callback_tracing_kind_t kind,
|
||||
uint32_t operation,
|
||||
const char** name,
|
||||
uint64_t* name_len)
|
||||
{
|
||||
if(kind < ROCPROFILER_CALLBACK_TRACING_NONE || kind >= ROCPROFILER_CALLBACK_TRACING_LAST)
|
||||
return ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND;
|
||||
@@ -167,7 +166,7 @@ rocprofiler_iterate_callback_tracing_kinds(rocprofiler_callback_tracing_kind_cb_
|
||||
{
|
||||
for(uint32_t i = 0; i < ROCPROFILER_CALLBACK_TRACING_LAST; ++i)
|
||||
{
|
||||
auto _success = callback(static_cast<rocprofiler_service_callback_tracing_kind_t>(i), data);
|
||||
auto _success = callback(static_cast<rocprofiler_callback_tracing_kind_t>(i), data);
|
||||
if(_success != 0) break;
|
||||
}
|
||||
|
||||
@@ -176,7 +175,7 @@ rocprofiler_iterate_callback_tracing_kinds(rocprofiler_callback_tracing_kind_cb_
|
||||
|
||||
rocprofiler_status_t
|
||||
rocprofiler_iterate_callback_tracing_kind_operations(
|
||||
rocprofiler_service_callback_tracing_kind_t kind,
|
||||
rocprofiler_callback_tracing_kind_t kind,
|
||||
rocprofiler_callback_tracing_kind_operation_cb_t callback,
|
||||
void* data)
|
||||
{
|
||||
|
||||
@@ -44,9 +44,7 @@ namespace rocprofiler
|
||||
{
|
||||
namespace context
|
||||
{
|
||||
using external_cid_cb_t = uint64_t (*)(rocprofiler_service_callback_tracing_kind_t,
|
||||
uint32_t,
|
||||
uint64_t);
|
||||
using external_cid_cb_t = uint64_t (*)(rocprofiler_callback_tracing_kind_t, uint32_t, uint64_t);
|
||||
|
||||
constexpr auto null_user_data = rocprofiler_user_data_t{.value = 0};
|
||||
struct correlation_id
|
||||
@@ -105,7 +103,7 @@ struct callback_tracing_service
|
||||
void* data = nullptr;
|
||||
};
|
||||
|
||||
using domain_t = rocprofiler_service_callback_tracing_kind_t;
|
||||
using domain_t = rocprofiler_callback_tracing_kind_t;
|
||||
using callback_array_t = std::array<callback_data, domain_info<domain_t>::last>;
|
||||
|
||||
domain_context<domain_t> domains = {};
|
||||
@@ -114,7 +112,7 @@ struct callback_tracing_service
|
||||
|
||||
struct buffer_tracing_service
|
||||
{
|
||||
using domain_t = rocprofiler_service_buffer_tracing_kind_t;
|
||||
using domain_t = rocprofiler_buffer_tracing_kind_t;
|
||||
using buffer_array_t = std::array<rocprofiler_buffer_id_t, domain_info<domain_t>::last>;
|
||||
|
||||
domain_context<domain_t> domains = {};
|
||||
|
||||
@@ -70,30 +70,28 @@ add_domain_op(domain_context<DomainT>& _cfg, DomainT _domain, uint32_t _op)
|
||||
}
|
||||
|
||||
// instantiate the templates
|
||||
template struct domain_context<rocprofiler_service_callback_tracing_kind_t>;
|
||||
template struct domain_context<rocprofiler_callback_tracing_kind_t>;
|
||||
|
||||
template rocprofiler_status_t
|
||||
add_domain<rocprofiler_service_callback_tracing_kind_t>(
|
||||
domain_context<rocprofiler_service_callback_tracing_kind_t>&,
|
||||
rocprofiler_service_callback_tracing_kind_t);
|
||||
add_domain<rocprofiler_callback_tracing_kind_t>(
|
||||
domain_context<rocprofiler_callback_tracing_kind_t>&,
|
||||
rocprofiler_callback_tracing_kind_t);
|
||||
|
||||
template rocprofiler_status_t
|
||||
add_domain<rocprofiler_service_buffer_tracing_kind_t>(
|
||||
domain_context<rocprofiler_service_buffer_tracing_kind_t>&,
|
||||
rocprofiler_service_buffer_tracing_kind_t);
|
||||
add_domain<rocprofiler_buffer_tracing_kind_t>(domain_context<rocprofiler_buffer_tracing_kind_t>&,
|
||||
rocprofiler_buffer_tracing_kind_t);
|
||||
|
||||
template rocprofiler_status_t
|
||||
add_domain_op<rocprofiler_service_callback_tracing_kind_t>(
|
||||
domain_context<rocprofiler_service_callback_tracing_kind_t>&,
|
||||
rocprofiler_service_callback_tracing_kind_t,
|
||||
add_domain_op<rocprofiler_callback_tracing_kind_t>(
|
||||
domain_context<rocprofiler_callback_tracing_kind_t>&,
|
||||
rocprofiler_callback_tracing_kind_t,
|
||||
uint32_t);
|
||||
|
||||
template struct domain_context<rocprofiler_service_buffer_tracing_kind_t>;
|
||||
template struct domain_context<rocprofiler_buffer_tracing_kind_t>;
|
||||
|
||||
template rocprofiler_status_t
|
||||
add_domain_op<rocprofiler_service_buffer_tracing_kind_t>(
|
||||
domain_context<rocprofiler_service_buffer_tracing_kind_t>&,
|
||||
rocprofiler_service_buffer_tracing_kind_t,
|
||||
uint32_t);
|
||||
add_domain_op<rocprofiler_buffer_tracing_kind_t>(domain_context<rocprofiler_buffer_tracing_kind_t>&,
|
||||
rocprofiler_buffer_tracing_kind_t,
|
||||
uint32_t);
|
||||
} // namespace context
|
||||
} // namespace rocprofiler
|
||||
|
||||
@@ -41,7 +41,7 @@ template <typename Tp>
|
||||
struct domain_info;
|
||||
|
||||
template <>
|
||||
struct domain_info<rocprofiler_service_callback_tracing_kind_t>
|
||||
struct domain_info<rocprofiler_callback_tracing_kind_t>
|
||||
{
|
||||
static constexpr size_t none = ROCPROFILER_CALLBACK_TRACING_NONE;
|
||||
static constexpr size_t last = ROCPROFILER_CALLBACK_TRACING_LAST;
|
||||
@@ -49,7 +49,7 @@ struct domain_info<rocprofiler_service_callback_tracing_kind_t>
|
||||
};
|
||||
|
||||
template <>
|
||||
struct domain_info<rocprofiler_service_buffer_tracing_kind_t>
|
||||
struct domain_info<rocprofiler_buffer_tracing_kind_t>
|
||||
{
|
||||
static constexpr size_t none = ROCPROFILER_BUFFER_TRACING_NONE;
|
||||
static constexpr size_t last = ROCPROFILER_BUFFER_TRACING_LAST;
|
||||
@@ -61,8 +61,8 @@ struct domain_info<rocprofiler_service_buffer_tracing_kind_t>
|
||||
template <typename DomainT>
|
||||
struct domain_context
|
||||
{
|
||||
using supported_domains_v = common::mpl::type_list<rocprofiler_service_callback_tracing_kind_t,
|
||||
rocprofiler_service_buffer_tracing_kind_t>;
|
||||
using supported_domains_v = common::mpl::type_list<rocprofiler_callback_tracing_kind_t,
|
||||
rocprofiler_buffer_tracing_kind_t>;
|
||||
static_assert(common::mpl::is_one_of<DomainT, supported_domains_v>::value,
|
||||
"Unsupported domain type");
|
||||
static constexpr auto opcode_padding_v = domain_info<DomainT>::padding;
|
||||
|
||||
@@ -450,9 +450,9 @@ get_names(std::vector<const char*>& _name_list, std::index_sequence<Idx...>)
|
||||
}
|
||||
|
||||
bool
|
||||
should_wrap_functor(rocprofiler_service_callback_tracing_kind_t _callback_domain,
|
||||
rocprofiler_service_buffer_tracing_kind_t _buffered_domain,
|
||||
int _operation)
|
||||
should_wrap_functor(rocprofiler_callback_tracing_kind_t _callback_domain,
|
||||
rocprofiler_buffer_tracing_kind_t _buffered_domain,
|
||||
int _operation)
|
||||
{
|
||||
// we loop over all the *registered* contexts and see if any of them, at any point in time,
|
||||
// might require callback or buffered API tracing
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace rocprofiler
|
||||
{
|
||||
namespace hsa
|
||||
{
|
||||
using activity_functor_t = int (*)(rocprofiler_service_callback_tracing_kind_t domain,
|
||||
uint32_t operation_id,
|
||||
void* data);
|
||||
using activity_functor_t = int (*)(rocprofiler_callback_tracing_kind_t domain,
|
||||
uint32_t operation_id,
|
||||
void* data);
|
||||
|
||||
using hsa_api_table_t = HsaApiTable;
|
||||
|
||||
|
||||
@@ -86,9 +86,9 @@ struct agent_data
|
||||
std::vector<hsa_device_type_t> agents = {};
|
||||
};
|
||||
|
||||
using callback_kind_names_t = std::map<rocprofiler_service_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_names_t = std::map<rocprofiler_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
std::map<rocprofiler_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
using wrap_count_t = std::pair<std::string_view, size_t>;
|
||||
|
||||
struct callback_name_info
|
||||
@@ -126,7 +126,7 @@ get_callback_tracing_names()
|
||||
// callback for each kind operation
|
||||
//
|
||||
static auto tracing_kind_operation_cb =
|
||||
[](rocprofiler_service_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
[](rocprofiler_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data_v);
|
||||
|
||||
if(kindv == ROCPROFILER_CALLBACK_TRACING_HSA_API)
|
||||
@@ -143,7 +143,7 @@ get_callback_tracing_names()
|
||||
//
|
||||
// callback for each callback kind (i.e. domain)
|
||||
//
|
||||
static auto tracing_kind_cb = [](rocprofiler_service_callback_tracing_kind_t kind, void* data) {
|
||||
static auto tracing_kind_cb = [](rocprofiler_callback_tracing_kind_t kind, void* data) {
|
||||
// store the callback kind name
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data);
|
||||
const char* name = nullptr;
|
||||
|
||||
@@ -72,9 +72,9 @@ struct agent_data
|
||||
std::vector<hsa_device_type_t> agents = {};
|
||||
};
|
||||
|
||||
using callback_kind_names_t = std::map<rocprofiler_service_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_names_t = std::map<rocprofiler_callback_tracing_kind_t, const char*>;
|
||||
using callback_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
std::map<rocprofiler_callback_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
|
||||
struct callback_name_info
|
||||
{
|
||||
@@ -90,7 +90,7 @@ get_callback_tracing_names()
|
||||
// callback for each kind operation
|
||||
//
|
||||
static auto tracing_kind_operation_cb =
|
||||
[](rocprofiler_service_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
[](rocprofiler_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data_v);
|
||||
|
||||
if(kindv == ROCPROFILER_CALLBACK_TRACING_HSA_API)
|
||||
@@ -107,7 +107,7 @@ get_callback_tracing_names()
|
||||
//
|
||||
// callback for each callback kind (i.e. domain)
|
||||
//
|
||||
static auto tracing_kind_cb = [](rocprofiler_service_callback_tracing_kind_t kind, void* data) {
|
||||
static auto tracing_kind_cb = [](rocprofiler_callback_tracing_kind_t kind, void* data) {
|
||||
// store the callback kind name
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data);
|
||||
const char* name = nullptr;
|
||||
@@ -131,9 +131,9 @@ get_callback_tracing_names()
|
||||
return cb_name_info;
|
||||
}
|
||||
|
||||
using buffer_kind_names_t = std::map<rocprofiler_service_buffer_tracing_kind_t, const char*>;
|
||||
using buffer_kind_names_t = std::map<rocprofiler_buffer_tracing_kind_t, const char*>;
|
||||
using buffer_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_buffer_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
std::map<rocprofiler_buffer_tracing_kind_t, std::map<uint32_t, const char*>>;
|
||||
|
||||
struct buffer_name_info
|
||||
{
|
||||
@@ -149,7 +149,7 @@ get_buffer_tracing_names()
|
||||
// callback for each kind operation
|
||||
//
|
||||
static auto tracing_kind_operation_cb =
|
||||
[](rocprofiler_service_buffer_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
[](rocprofiler_buffer_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
auto* name_info_v = static_cast<buffer_name_info*>(data_v);
|
||||
|
||||
if(kindv == ROCPROFILER_BUFFER_TRACING_HSA_API)
|
||||
@@ -166,7 +166,7 @@ get_buffer_tracing_names()
|
||||
//
|
||||
// callback for each buffer kind (i.e. domain)
|
||||
//
|
||||
static auto tracing_kind_cb = [](rocprofiler_service_buffer_tracing_kind_t kind, void* data) {
|
||||
static auto tracing_kind_cb = [](rocprofiler_buffer_tracing_kind_t kind, void* data) {
|
||||
// store the buffer kind name
|
||||
auto* name_info_v = static_cast<buffer_name_info*>(data);
|
||||
const char* name = nullptr;
|
||||
@@ -236,7 +236,7 @@ tool_tracing_callback(rocprofiler_callback_tracing_record_t record,
|
||||
std::stringstream arg_ss = {};
|
||||
} info_data_v;
|
||||
|
||||
auto info_data_cb = [](rocprofiler_service_callback_tracing_kind_t,
|
||||
auto info_data_cb = [](rocprofiler_callback_tracing_kind_t,
|
||||
uint32_t,
|
||||
uint32_t arg_num,
|
||||
const char* arg_name,
|
||||
|
||||
@@ -101,13 +101,13 @@ struct source_location
|
||||
};
|
||||
|
||||
using call_stack_t = std::vector<source_location>;
|
||||
using buffer_kind_names_t = std::map<rocprofiler_service_buffer_tracing_kind_t, std::string>;
|
||||
using buffer_kind_names_t = std::map<rocprofiler_buffer_tracing_kind_t, std::string>;
|
||||
using buffer_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_buffer_tracing_kind_t, std::map<uint32_t, std::string>>;
|
||||
std::map<rocprofiler_buffer_tracing_kind_t, std::map<uint32_t, std::string>>;
|
||||
|
||||
using callback_kind_names_t = std::map<rocprofiler_service_callback_tracing_kind_t, std::string>;
|
||||
using callback_kind_names_t = std::map<rocprofiler_callback_tracing_kind_t, std::string>;
|
||||
using callback_kind_operation_names_t =
|
||||
std::map<rocprofiler_service_callback_tracing_kind_t, std::map<uint32_t, std::string>>;
|
||||
std::map<rocprofiler_callback_tracing_kind_t, std::map<uint32_t, std::string>>;
|
||||
|
||||
using kernel_symbol_data_t = rocprofiler_callback_tracing_code_object_kernel_symbol_register_data_t;
|
||||
using kernel_symbol_map_t = std::unordered_map<rocprofiler_kernel_id_t, kernel_symbol_data_t>;
|
||||
@@ -149,7 +149,7 @@ get_callback_tracing_names()
|
||||
// callback for each kind operation
|
||||
//
|
||||
static auto tracing_kind_operation_cb =
|
||||
[](rocprofiler_service_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
[](rocprofiler_callback_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data_v);
|
||||
|
||||
if(kindv == ROCPROFILER_CALLBACK_TRACING_HSA_API)
|
||||
@@ -166,7 +166,7 @@ get_callback_tracing_names()
|
||||
//
|
||||
// callback for each buffer kind (i.e. domain)
|
||||
//
|
||||
static auto tracing_kind_cb = [](rocprofiler_service_callback_tracing_kind_t kind, void* data) {
|
||||
static auto tracing_kind_cb = [](rocprofiler_callback_tracing_kind_t kind, void* data) {
|
||||
// store the buffer kind name
|
||||
auto* name_info_v = static_cast<callback_name_info*>(data);
|
||||
const char* name = nullptr;
|
||||
@@ -198,7 +198,7 @@ get_buffer_tracing_names()
|
||||
// callback for each kind operation
|
||||
//
|
||||
static auto tracing_kind_operation_cb =
|
||||
[](rocprofiler_service_buffer_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
[](rocprofiler_buffer_tracing_kind_t kindv, uint32_t operation, void* data_v) {
|
||||
auto* name_info_v = static_cast<buffer_name_info*>(data_v);
|
||||
|
||||
if(kindv == ROCPROFILER_BUFFER_TRACING_HSA_API)
|
||||
@@ -215,7 +215,7 @@ get_buffer_tracing_names()
|
||||
//
|
||||
// callback for each buffer kind (i.e. domain)
|
||||
//
|
||||
static auto tracing_kind_cb = [](rocprofiler_service_buffer_tracing_kind_t kind, void* data) {
|
||||
static auto tracing_kind_cb = [](rocprofiler_buffer_tracing_kind_t kind, void* data) {
|
||||
// store the buffer kind name
|
||||
auto* name_info_v = static_cast<buffer_name_info*>(data);
|
||||
const char* name = nullptr;
|
||||
|
||||
Ссылка в новой задаче
Block a user