Skip to content

Commit

Permalink
SWDEV-275232: Replaced the use of on_exit()
Browse files Browse the repository at this point in the history
on_exit() registered exit_handler function, but in the case of OpenMP applications the registered exit func exit_handler was called after the dlclose of the library. So we removed exit_handler from roctracer as it is already handled in both rocprofiler and rocprof script.

Change-Id: I7c3d42e6ccc282e713b48b4a7faec4935e7a2600
(cherry picked from commit aa41554)
  • Loading branch information
ammarwa committed Oct 9, 2021
1 parent ae48d18 commit d8ecefd
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions test/tool/tracer_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,15 +960,10 @@ void tool_load() {
ONLOAD_TRACE_END();
}

void exit_handler(int status, void* arg) {
ONLOAD_TRACE("status(" << status << ") arg(" << arg << ")");
}

// HSA-runtime tool on-load method
extern "C" PUBLIC_API bool OnLoad(HsaApiTable* table, uint64_t runtime_version, uint64_t failed_tool_count,
const char* const* failed_tool_names) {
ONLOAD_TRACE_BEG();
on_exit(exit_handler, NULL);

timer = new hsa_rt_utils::Timer(table->core_->hsa_system_get_info_fn);

Expand Down

0 comments on commit d8ecefd

Please sign in to comment.