Check to force tools to initialize the ctx id to zero. (#1135)
* Check to force tool to initialize the ctx id to zero. * initialize rocprofiler_context_id_t with 0 in units tests * changelog --------- Co-authored-by: Gopesh Bhardwaj <gopesh.bhardwaj@amd.com>
Šī revīzija ir iekļauta:
revīziju iesūtīja
GitHub
vecāks
a92fa8f071
revīzija
3f91d90bbc
@@ -115,6 +115,7 @@ Full documentation for ROCprofiler-SDK is available at [Click Here](source/docs/
|
||||
- Fixed MeanOccupancy* metrics
|
||||
- Fix aborted-app validation test to properly check for hipExtHostAlloc command now that it is supported
|
||||
- Fix for SQ and GRBM metrics implicitly reduced.
|
||||
- Check to force tools to initialize context id with zero.
|
||||
- Fix to handle a range of values for select() dimension in expressions parser.
|
||||
|
||||
### Removed
|
||||
|
||||
@@ -111,7 +111,7 @@ using CodeobjAddressTranslate = rocprofiler::sdk::codeobj::disassembly::CodeobjA
|
||||
using SymbolInfo = rocprofiler::sdk::codeobj::disassembly::SymbolInfo;
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
|
||||
struct isa_map_elem_t
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ using kernel_symbol_map_t = std::unordered_map<rocprofiler_kernel_id_t, kernel_
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
buffer_name_info client_name_info = {};
|
||||
kernel_symbol_map_t client_kernels = {};
|
||||
|
||||
@@ -71,7 +71,7 @@ using common::source_location;
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
|
||||
void
|
||||
print_call_stack(const call_stack_t& _call_stack)
|
||||
@@ -163,7 +163,7 @@ tool_control_init(rocprofiler_context_id_t& primary_ctx)
|
||||
// A separate context is used because if the context that is associated with roctxProfilerPause
|
||||
// disabled that same context, a call to roctxProfilerResume would be ignored because the
|
||||
// context that enables the callback for that API call is disabled.
|
||||
auto cntrl_ctx = rocprofiler_context_id_t{};
|
||||
auto cntrl_ctx = rocprofiler_context_id_t{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&cntrl_ctx), "control context creation failed");
|
||||
|
||||
// enable callback marker tracing with only the pause/resume operations
|
||||
|
||||
@@ -95,7 +95,7 @@ using CodeobjAddressTranslate = rocprofiler::sdk::codeobj::disassembly::CodeobjA
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
kernel_symbol_map_t registered_kernels = {};
|
||||
|
||||
CodeobjAddressTranslate codeobjTranslate;
|
||||
|
||||
@@ -79,7 +79,7 @@ using kernel_symbol_map_t = std::unordered_map<rocprofiler_kernel_id_t, kernel_
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
kernel_symbol_map_t* client_kernels = nullptr;
|
||||
|
||||
std::string
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace
|
||||
rocprofiler_context_id_t&
|
||||
get_client_ctx()
|
||||
{
|
||||
static rocprofiler_context_id_t ctx;
|
||||
static rocprofiler_context_id_t ctx{0};
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace
|
||||
rocprofiler_context_id_t&
|
||||
get_client_ctx()
|
||||
{
|
||||
static rocprofiler_context_id_t ctx;
|
||||
static rocprofiler_context_id_t ctx{0};
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ expected_agent()
|
||||
rocprofiler_context_id_t&
|
||||
get_client_ctx()
|
||||
{
|
||||
static rocprofiler_context_id_t ctx;
|
||||
static rocprofiler_context_id_t ctx{0};
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace
|
||||
rocprofiler_context_id_t&
|
||||
get_client_ctx()
|
||||
{
|
||||
static rocprofiler_context_id_t ctx;
|
||||
static rocprofiler_context_id_t ctx{0};
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ using retired_corr_id_set_t = std::unordered_set<uint64_t>;
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
buffer_name_info* client_name_info = new buffer_name_info{};
|
||||
kernel_symbol_map_t* client_kernels = new kernel_symbol_map_t{};
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx;
|
||||
rocprofiler_context_id_t client_ctx{0};
|
||||
|
||||
int
|
||||
tool_init(rocprofiler_client_finalize_t fini_func, void* /*tool_data*/)
|
||||
|
||||
@@ -84,7 +84,7 @@ rocprofiler_assign_callback_thread(rocprofiler_buffer_id_t buffer_id,
|
||||
```cpp
|
||||
{
|
||||
// create a context
|
||||
auto context_id = rocprofiler_context_id_t{};
|
||||
auto context_id = rocprofiler_context_id_t{0};
|
||||
rocprofiler_create_context(&context_id);
|
||||
|
||||
// create a buffer associated with the context
|
||||
|
||||
@@ -31,7 +31,7 @@ This guide explains how to setup dispatch and agent profiling along will describ
|
||||
The setup for dispatch and agent profiling is similar (with only minor changes needed to adapt code from one to another). In tool_init, similar to tracing services, you need to create a context and a buffer to collect the output. Important Note: buffered_callback in rocprofiler_create_buffer is called when the buffer is full with a vector of collected counter samples, see the buffered callback section below for processing.
|
||||
|
||||
```CPP
|
||||
rocprofiler_context_id_t ctx;
|
||||
rocprofiler_context_id_t ctx{0};
|
||||
rocprofiler_buffer_id_t buff;
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&ctx), "context creation failed");
|
||||
ROCPROFILER_CALL(rocprofiler_create_buffer(ctx,
|
||||
|
||||
@@ -92,7 +92,7 @@ tool_init(rocprofiler_client_finalize_t fini_func,
|
||||
void* data_v)
|
||||
{
|
||||
// create a context
|
||||
auto ctx = rocprofiler_context_id_t{};
|
||||
auto ctx = rocprofiler_context_id_t{0};
|
||||
rocprofiler_create_context(&ctx);
|
||||
|
||||
// ... associate services with context ...
|
||||
@@ -178,7 +178,7 @@ tool_init(rocprofiler_client_finalize_t fini_func,
|
||||
tool_data->finalizer = fini_func;
|
||||
|
||||
// create a context
|
||||
auto ctx = rocprofiler_context_id_t{};
|
||||
auto ctx = rocprofiler_context_id_t{0};
|
||||
rocprofiler_create_context(&ctx);
|
||||
|
||||
// Save your contexts
|
||||
|
||||
@@ -68,6 +68,7 @@ typedef enum // NOLINT(performance-enum-size)
|
||||
///< into active array failed)
|
||||
ROCPROFILER_STATUS_ERROR_CONTEXT_CONFLICT, ///< Context operation failed due to a conflict with
|
||||
///< another context
|
||||
ROCPROFILER_STATUS_ERROR_CONTEXT_ID_NOT_ZERO, ///< Context ID is not initialized to zero
|
||||
ROCPROFILER_STATUS_ERROR_BUFFER_BUSY, ///< buffer operation failed because it currently busy
|
||||
///< handling another request (e.g. flushing)
|
||||
ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED, ///< service has already been configured
|
||||
|
||||
@@ -153,7 +153,7 @@ rocprofiler_is_finalized(int* status) ROCPROFILER_API ROCPROFILER_NONNULL(1);
|
||||
*
|
||||
* assert(*static_cast<int*>(tool_data) == 1234 && "tool_data is wrong");
|
||||
*
|
||||
* rocprofiler_context_id_t ctx;
|
||||
* rocprofiler_context_id_t ctx{0};
|
||||
* rocprofiler_create_context(&ctx);
|
||||
*
|
||||
* if(int valid_ctx = 0;
|
||||
|
||||
@@ -266,7 +266,7 @@ is_targeted_kernel(uint64_t _kern_id)
|
||||
auto&
|
||||
get_client_ctx()
|
||||
{
|
||||
static rocprofiler_context_id_t context_id;
|
||||
static rocprofiler_context_id_t context_id{0};
|
||||
return context_id;
|
||||
}
|
||||
|
||||
@@ -1270,7 +1270,7 @@ tool_init(rocprofiler_client_finalize_t fini_func, void* tool_data)
|
||||
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&get_client_ctx()), "create context failed");
|
||||
|
||||
auto code_obj_ctx = rocprofiler_context_id_t{};
|
||||
auto code_obj_ctx = rocprofiler_context_id_t{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&code_obj_ctx), "failed to create context");
|
||||
|
||||
ROCPROFILER_CALL(
|
||||
@@ -1294,7 +1294,7 @@ tool_init(rocprofiler_client_finalize_t fini_func, void* tool_data)
|
||||
nullptr),
|
||||
"callback tracing service failed to configure");
|
||||
|
||||
auto pause_resume_ctx = rocprofiler_context_id_t{};
|
||||
auto pause_resume_ctx = rocprofiler_context_id_t{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&pause_resume_ctx), "failed to create context");
|
||||
|
||||
ROCPROFILER_CALL(rocprofiler_configure_callback_tracing_service(
|
||||
@@ -1465,7 +1465,7 @@ tool_init(rocprofiler_client_finalize_t fini_func, void* tool_data)
|
||||
|
||||
if(tool::get_config().kernel_rename)
|
||||
{
|
||||
auto rename_ctx = rocprofiler_context_id_t{};
|
||||
auto rename_ctx = rocprofiler_context_id_t{0};
|
||||
auto marker_core_api_kinds = std::array<rocprofiler_tracing_operation_t, 3>{
|
||||
ROCPROFILER_MARKER_CORE_API_ID_roctxMarkA,
|
||||
ROCPROFILER_MARKER_CORE_API_ID_roctxRangePushA,
|
||||
|
||||
@@ -41,6 +41,7 @@ extern "C" {
|
||||
rocprofiler_status_t
|
||||
rocprofiler_create_context(rocprofiler_context_id_t* context_id)
|
||||
{
|
||||
if(context_id->handle != 0) return ROCPROFILER_STATUS_ERROR_CONTEXT_ID_NOT_ZERO;
|
||||
// context already registered
|
||||
if(rocprofiler::context::get_registered_context(*context_id))
|
||||
return ROCPROFILER_STATUS_ERROR_CONTEXT_INVALID;
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace
|
||||
rocprofiler_context_id_t&
|
||||
get_client_ctx()
|
||||
{
|
||||
static rocprofiler_context_id_t ctx;
|
||||
static rocprofiler_context_id_t ctx{0};
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ dispatch_callback(rocprofiler_dispatch_counting_service_data_t,
|
||||
rocprofiler_context_id_t&
|
||||
get_client_ctx()
|
||||
{
|
||||
static rocprofiler_context_id_t ctx;
|
||||
static rocprofiler_context_id_t ctx{0};
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ struct callback_data
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
rocprofiler_callback_thread_t client_thread = {};
|
||||
uint64_t client_workflow_count = {};
|
||||
@@ -344,7 +344,7 @@ TEST(pc_sampling, rocprofiler_configure_pc_sampling_service)
|
||||
|
||||
// We will create another context and try configuring pc sampling inside it,
|
||||
// that is supposed to fail.
|
||||
rocprofiler_context_id_t another_ctx;
|
||||
rocprofiler_context_id_t another_ctx{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&another_ctx), "failed to create context");
|
||||
rocprofiler_buffer_id_t another_buff;
|
||||
ROCPROFILER_CALL(rocprofiler_create_buffer(another_ctx,
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ struct callback_data
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
rocprofiler_callback_thread_t client_thread = {};
|
||||
uint64_t client_workflow_count = {};
|
||||
|
||||
@@ -46,7 +46,7 @@ struct callback_data
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
rocprofiler_callback_thread_t client_thread = {};
|
||||
uint64_t client_workflow_count = {};
|
||||
|
||||
@@ -58,7 +58,7 @@ struct callback_data
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
rocprofiler_callback_thread_t client_thread = {};
|
||||
uint64_t client_workflow_count = {};
|
||||
|
||||
@@ -55,6 +55,8 @@ ROCPROFILER_STATUS_STRING(ROCPROFILER_STATUS_ERROR_CONTEXT_INVALID,
|
||||
ROCPROFILER_STATUS_STRING(ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_STARTED, "Context failed to start")
|
||||
ROCPROFILER_STATUS_STRING(ROCPROFILER_STATUS_ERROR_CONTEXT_CONFLICT,
|
||||
"Context has a conflict with another context")
|
||||
ROCPROFILER_STATUS_STRING(ROCPROFILER_STATUS_ERROR_CONTEXT_ID_NOT_ZERO,
|
||||
"Context ID should be initialized to zero")
|
||||
ROCPROFILER_STATUS_STRING(
|
||||
ROCPROFILER_STATUS_ERROR_BUFFER_BUSY,
|
||||
"Buffer operation failed because it is currently busy handling another request")
|
||||
|
||||
@@ -56,7 +56,7 @@ struct callback_data
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
rocprofiler_callback_thread_t client_thread = {};
|
||||
uint64_t client_workflow_count = {};
|
||||
@@ -73,7 +73,7 @@ struct callback_data_ext
|
||||
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_hsa_ctx = {};
|
||||
rocprofiler_context_id_t client_hsa_ctx = {0};
|
||||
rocprofiler_context_id_t client_hip_ctx = {};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
rocprofiler_callback_thread_t client_thread = {};
|
||||
|
||||
@@ -60,7 +60,7 @@ struct callback_data
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_buffer_id_t client_buffer = {};
|
||||
rocprofiler_callback_thread_t client_thread = {};
|
||||
uint64_t client_workflow_count = {};
|
||||
@@ -472,7 +472,7 @@ TEST(rocprofiler_lib, buffered_external_correlation)
|
||||
return &cfg_result;
|
||||
};
|
||||
|
||||
auto ctx = rocprofiler_context_id_t{};
|
||||
auto ctx = rocprofiler_context_id_t{0};
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_EQ(rocprofiler_force_configure(rocp_init), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
|
||||
@@ -225,7 +225,7 @@ TEST(rocprofiler_lib, registration_lambda_no_result)
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
auto ctx = rocprofiler_context_id_t{};
|
||||
auto ctx = rocprofiler_context_id_t{0};
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_EQ(rocprofiler_force_configure(rocp_init), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
@@ -313,7 +313,7 @@ TEST(rocprofiler_lib, callback_registration_lambda_with_result)
|
||||
return std::chrono::steady_clock::now().time_since_epoch().count();
|
||||
};
|
||||
|
||||
auto ctx = rocprofiler_context_id_t{};
|
||||
auto ctx = rocprofiler_context_id_t{0};
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_EQ(rocprofiler_force_configure(rocp_init), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
@@ -469,7 +469,7 @@ TEST(rocprofiler_lib, buffer_registration_lambda_with_result)
|
||||
return &cfg_result;
|
||||
};
|
||||
|
||||
auto ctx = rocprofiler_context_id_t{};
|
||||
auto ctx = rocprofiler_context_id_t{0};
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_EQ(rocprofiler_force_configure(rocp_init), ROCPROFILER_STATUS_SUCCESS);
|
||||
EXPECT_NE(rocprofiler_create_context(&ctx), ROCPROFILER_STATUS_SUCCESS);
|
||||
|
||||
@@ -309,7 +309,7 @@ TEST(rocprofiler_lib, roctx_callback_tracing)
|
||||
cb_data->client_workflow_count++;
|
||||
cb_data->client_fini_func = fini_func;
|
||||
|
||||
auto pause_resume_ctx = rocprofiler_context_id_t{};
|
||||
auto pause_resume_ctx = rocprofiler_context_id_t{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&pause_resume_ctx), "failed to create context");
|
||||
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&cb_data->client_ctx),
|
||||
@@ -425,7 +425,7 @@ TEST(rocprofiler_lib, roctx_buffered_tracing)
|
||||
cb_data->client_workflow_count++;
|
||||
cb_data->client_fini_func = fini_func;
|
||||
|
||||
auto pause_resume_ctx = rocprofiler_context_id_t{};
|
||||
auto pause_resume_ctx = rocprofiler_context_id_t{0};
|
||||
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&pause_resume_ctx), "failed to create context");
|
||||
ROCPROFILER_CALL(rocprofiler_configure_callback_tracing_service(
|
||||
|
||||
@@ -134,7 +134,7 @@ TEST(thread_trace, configure_test)
|
||||
registration::init_logging();
|
||||
registration::set_init_status(-1);
|
||||
context::push_client(1);
|
||||
rocprofiler_context_id_t ctx;
|
||||
rocprofiler_context_id_t ctx{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&ctx), "context creation failed");
|
||||
|
||||
std::vector<rocprofiler_att_parameter_t> params;
|
||||
@@ -171,7 +171,7 @@ TEST(thread_trace, perfcounters_configure_test)
|
||||
registration::init_logging();
|
||||
registration::set_init_status(-1);
|
||||
context::push_client(1);
|
||||
rocprofiler_context_id_t ctx;
|
||||
rocprofiler_context_id_t ctx{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&ctx), "context creation failed");
|
||||
|
||||
// Only GFX9 SQ Block counters are supported
|
||||
@@ -299,7 +299,7 @@ TEST(thread_trace, agent_configure_test)
|
||||
registration::init_logging();
|
||||
registration::set_init_status(-1);
|
||||
context::push_client(1);
|
||||
rocprofiler_context_id_t ctx;
|
||||
rocprofiler_context_id_t ctx{0};
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&ctx), "context creation failed");
|
||||
|
||||
ROCPROFILER_CALL(rocprofiler_query_available_agents(ROCPROFILER_AGENT_INFO_VERSION_0,
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace
|
||||
{
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
rocprofiler_client_finalize_t client_fini_func = nullptr;
|
||||
rocprofiler_context_id_t client_ctx;
|
||||
rocprofiler_context_id_t client_ctx{0};
|
||||
|
||||
int
|
||||
tool_init(rocprofiler_client_finalize_t fini_func, void* /*tool_data*/)
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace ATTTest
|
||||
{
|
||||
namespace Agent
|
||||
{
|
||||
rocprofiler_context_id_t client_ctx = {};
|
||||
rocprofiler_context_id_t client_ctx = {0};
|
||||
rocprofiler_client_id_t* client_id = nullptr;
|
||||
std::atomic<bool> valid_data{false};
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ int
|
||||
tool_init(rocprofiler_client_finalize_t /* fini_func */, void* tool_data)
|
||||
{
|
||||
Callbacks::callbacks_init();
|
||||
static rocprofiler_context_id_t client_ctx = {};
|
||||
static rocprofiler_context_id_t client_ctx = {0};
|
||||
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&client_ctx), "context creation");
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ int
|
||||
tool_init(rocprofiler_client_finalize_t /* fini_func */, void* tool_data)
|
||||
{
|
||||
Callbacks::callbacks_init();
|
||||
static rocprofiler_context_id_t client_ctx = {};
|
||||
static rocprofiler_context_id_t client_ctx = {0};
|
||||
|
||||
ROCPROFILER_CALL(rocprofiler_create_context(&client_ctx), "context creation");
|
||||
|
||||
|
||||
@@ -904,23 +904,23 @@ void
|
||||
pop_external_correlation();
|
||||
|
||||
// contexts
|
||||
rocprofiler_context_id_t hsa_api_callback_ctx = {};
|
||||
rocprofiler_context_id_t hip_api_callback_ctx = {};
|
||||
rocprofiler_context_id_t marker_api_callback_ctx = {};
|
||||
rocprofiler_context_id_t code_object_ctx = {};
|
||||
rocprofiler_context_id_t rccl_api_callback_ctx = {};
|
||||
rocprofiler_context_id_t hsa_api_buffered_ctx = {};
|
||||
rocprofiler_context_id_t hip_api_buffered_ctx = {};
|
||||
rocprofiler_context_id_t marker_api_buffered_ctx = {};
|
||||
rocprofiler_context_id_t memory_copy_callback_ctx = {};
|
||||
rocprofiler_context_id_t memory_copy_buffered_ctx = {};
|
||||
rocprofiler_context_id_t rccl_api_buffered_ctx = {};
|
||||
rocprofiler_context_id_t counter_collection_ctx = {};
|
||||
rocprofiler_context_id_t scratch_memory_ctx = {};
|
||||
rocprofiler_context_id_t corr_id_retire_ctx = {};
|
||||
rocprofiler_context_id_t kernel_dispatch_callback_ctx = {};
|
||||
rocprofiler_context_id_t kernel_dispatch_buffered_ctx = {};
|
||||
rocprofiler_context_id_t page_migration_ctx = {};
|
||||
rocprofiler_context_id_t hsa_api_callback_ctx = {0};
|
||||
rocprofiler_context_id_t hip_api_callback_ctx = {0};
|
||||
rocprofiler_context_id_t marker_api_callback_ctx = {0};
|
||||
rocprofiler_context_id_t code_object_ctx = {0};
|
||||
rocprofiler_context_id_t rccl_api_callback_ctx = {0};
|
||||
rocprofiler_context_id_t hsa_api_buffered_ctx = {0};
|
||||
rocprofiler_context_id_t hip_api_buffered_ctx = {0};
|
||||
rocprofiler_context_id_t marker_api_buffered_ctx = {0};
|
||||
rocprofiler_context_id_t memory_copy_callback_ctx = {0};
|
||||
rocprofiler_context_id_t memory_copy_buffered_ctx = {0};
|
||||
rocprofiler_context_id_t rccl_api_buffered_ctx = {0};
|
||||
rocprofiler_context_id_t counter_collection_ctx = {0};
|
||||
rocprofiler_context_id_t scratch_memory_ctx = {0};
|
||||
rocprofiler_context_id_t corr_id_retire_ctx = {0};
|
||||
rocprofiler_context_id_t kernel_dispatch_callback_ctx = {0};
|
||||
rocprofiler_context_id_t kernel_dispatch_buffered_ctx = {0};
|
||||
rocprofiler_context_id_t page_migration_ctx = {0};
|
||||
// buffers
|
||||
rocprofiler_buffer_id_t hsa_api_buffered_buffer = {};
|
||||
rocprofiler_buffer_id_t hip_api_buffered_buffer = {};
|
||||
|
||||
Atsaukties uz šo jaunā problēmā
Block a user