SWDEV-415888: fixing issues with rocprof tool duplication for testing

Change-Id: I9168029cfc9519879bd024286ca6e2d9842deb85
This commit is contained in:
Ammar ELWazir
2024-05-12 16:43:26 +00:00
والد 0fc74490cd
کامیت 988bf4f93d
3فایلهای تغییر یافته به همراه29 افزوده شده و 20 حذف شده
+8 -1
مشاهده پرونده
@@ -88,9 +88,16 @@ bool TestHsa::Initialize(int /*arg_cnt*/, char** /*arg_list*/) {
// Obtain the code object file name
std::string agentName(agent_info_->name);
const char* hsaco_obj_files_path_str = getenv("HSACO_OBJ_FILES_PATH");
fs::path hsaco_obj_files_path;
Dl_info dl_info;
if(hsaco_obj_files_path_str) {
hsaco_obj_files_path = fs::path(hsaco_obj_files_path_str);
} else {
hsaco_obj_files_path = fs::path(dl_info.dli_fname);
}
if (dladdr(reinterpret_cast<const void*>(TestHsa::HsaShutdown), &dl_info) != 0)
brig_path_obj_.append(fs::path(dl_info.dli_fname).remove_filename().remove_filename());
brig_path_obj_.append(hsaco_obj_files_path.remove_filename().remove_filename());
brig_path_obj_.append(agentName);
brig_path_obj_.append("_" + name_ + ".hsaco");