Update include/rocprofiler and lib/rocprofiler (#166)
- renamed inconsistent callback tracing types
- updated HIP and Marker API data structures (resemble HSA)
- cleaned up api_args.h and api_id.h headers
- cleaned up hsa.h, hip.h, and marker.h headers
- update to use (more consistent) name changes
- update code object data structs
- ROCPROFILER_SERVICE_CALLBACK_PHASE_{LOAD,UNLOAD} equivalent to ENTER, EXIT respectively
[ROCm/rocprofiler-sdk commit: cfbea0e5eb]
This commit is contained in:
committed by
GitHub
parent
a276ef5fcf
commit
e4ebd5a22a
@@ -205,7 +205,7 @@ rocprofiler_iterate_callback_tracing_kind_operation_args(
|
||||
{
|
||||
rocprofiler::hsa::iterate_args(
|
||||
record.operation,
|
||||
*static_cast<rocprofiler_hsa_api_callback_tracer_data_t*>(record.payload),
|
||||
*static_cast<rocprofiler_callback_tracing_hsa_api_data_t*>(record.payload),
|
||||
callback,
|
||||
user_data);
|
||||
return ROCPROFILER_STATUS_SUCCESS;
|
||||
|
||||
@@ -138,13 +138,13 @@
|
||||
\
|
||||
static auto get_functor() { return get_functor(get_table_func()); } \
|
||||
\
|
||||
static std::vector<void*> as_arg_addr(rocprofiler_hsa_api_callback_tracer_data_t) \
|
||||
static std::vector<void*> as_arg_addr(rocprofiler_callback_tracing_hsa_api_data_t) \
|
||||
{ \
|
||||
return std::vector<void*>{}; \
|
||||
} \
|
||||
\
|
||||
static std::vector<std::pair<std::string, std::string>> as_arg_list( \
|
||||
rocprofiler_hsa_api_callback_tracer_data_t) \
|
||||
rocprofiler_callback_tracing_hsa_api_data_t) \
|
||||
{ \
|
||||
return {}; \
|
||||
} \
|
||||
@@ -211,13 +211,13 @@
|
||||
static auto get_functor() { return get_functor(get_table_func()); } \
|
||||
\
|
||||
static std::vector<void*> as_arg_addr( \
|
||||
rocprofiler_hsa_api_callback_tracer_data_t trace_data) \
|
||||
rocprofiler_callback_tracing_hsa_api_data_t trace_data) \
|
||||
{ \
|
||||
return std::vector<void*>{ \
|
||||
GET_ADDR_MEMBER_FIELDS(get_api_data_args(trace_data.args), __VA_ARGS__)}; \
|
||||
} \
|
||||
\
|
||||
static auto as_arg_list(rocprofiler_hsa_api_callback_tracer_data_t trace_data) \
|
||||
static auto as_arg_list(rocprofiler_callback_tracing_hsa_api_data_t trace_data) \
|
||||
{ \
|
||||
return utils::stringize( \
|
||||
GET_NAMED_MEMBER_FIELDS(get_api_data_args(trace_data.args), __VA_ARGS__)); \
|
||||
|
||||
@@ -228,7 +228,7 @@ hsa_api_impl<Idx>::functor(Args&&... args)
|
||||
|
||||
constexpr auto empty_user_data = rocprofiler_user_data_t{.value = 0};
|
||||
auto buffer_record = rocprofiler_buffer_tracing_hsa_api_record_t{};
|
||||
auto tracer_data = rocprofiler_hsa_api_callback_tracer_data_t{};
|
||||
auto tracer_data = rocprofiler_callback_tracing_hsa_api_data_t{};
|
||||
auto internal_corr_id = context::correlation_tracing_service::get_unique_internal_id();
|
||||
|
||||
// construct the buffered info before the callback so the callbacks are as closely wrapped
|
||||
@@ -246,7 +246,7 @@ hsa_api_impl<Idx>::functor(Args&&... args)
|
||||
// invoke the callbacks
|
||||
if(!callback_contexts.empty())
|
||||
{
|
||||
tracer_data.size = sizeof(rocprofiler_hsa_api_callback_tracer_data_t);
|
||||
tracer_data.size = sizeof(rocprofiler_callback_tracing_hsa_api_data_t);
|
||||
set_data_args(info_type::get_api_data_args(tracer_data.args), std::forward<Args>(args)...);
|
||||
|
||||
for(auto& itr : callback_contexts)
|
||||
@@ -382,10 +382,10 @@ id_by_name(const char* name, std::index_sequence<Idx, IdxTail...>)
|
||||
|
||||
template <size_t Idx, size_t... IdxTail>
|
||||
void
|
||||
iterate_args(const uint32_t id,
|
||||
const rocprofiler_hsa_api_callback_tracer_data_t& data,
|
||||
rocprofiler_callback_tracing_operation_args_cb_t func,
|
||||
void* user_data,
|
||||
iterate_args(const uint32_t id,
|
||||
const rocprofiler_callback_tracing_hsa_api_data_t& data,
|
||||
rocprofiler_callback_tracing_operation_args_cb_t func,
|
||||
void* user_data,
|
||||
std::index_sequence<Idx, IdxTail...>)
|
||||
{
|
||||
if(Idx == id)
|
||||
@@ -495,10 +495,10 @@ id_by_name(const char* name)
|
||||
}
|
||||
|
||||
void
|
||||
iterate_args(uint32_t id,
|
||||
const rocprofiler_hsa_api_callback_tracer_data_t& data,
|
||||
rocprofiler_callback_tracing_operation_args_cb_t callback,
|
||||
void* user_data)
|
||||
iterate_args(uint32_t id,
|
||||
const rocprofiler_callback_tracing_hsa_api_data_t& data,
|
||||
rocprofiler_callback_tracing_operation_args_cb_t callback,
|
||||
void* user_data)
|
||||
{
|
||||
if(callback)
|
||||
iterate_args(
|
||||
|
||||
@@ -64,10 +64,10 @@ uint32_t
|
||||
id_by_name(const char* name);
|
||||
|
||||
void
|
||||
iterate_args(uint32_t id,
|
||||
const rocprofiler_hsa_api_callback_tracer_data_t& data,
|
||||
rocprofiler_callback_tracing_operation_args_cb_t callback,
|
||||
void* user_data);
|
||||
iterate_args(uint32_t id,
|
||||
const rocprofiler_callback_tracing_hsa_api_data_t& data,
|
||||
rocprofiler_callback_tracing_operation_args_cb_t callback,
|
||||
void* user_data);
|
||||
|
||||
std::vector<const char*>
|
||||
get_names();
|
||||
|
||||
Reference in New Issue
Block a user