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>
Bu işleme şunda yer alıyor:
1 ebeveyn
a92fa8f071
işleme
3f91d90bbc
36 files changed
+66
-61
No files matched your search
@@ -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*/)
|
||||
|
||||
Reference in new issue
Bir kullanıcı engelle