Adding late-replace envvar filenames to ATT

Change-Id: I5df51934ffa25358503013e1a230adb894d6ff94
This commit is contained in:
Giovanni LB
2024-02-16 14:19:22 -03:00
committed by Giovanni Baraldi
parent a1999fa366
commit fe00badc6e
3 changed files with 43 additions and 6 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ bool AttTracer::AsyncSignalHandlerATT(hsa_signal_value_t /* signal */, void* dat
// return true;
rocprofiler_record_att_tracer_t record{};
record.kernel_id = rocprofiler_kernel_id_t{pending.kernel_descriptor};
record.gpu_id = rocprofiler_agent_id_t{(uint64_t)queue_info_session->gpu_index};
record.gpu_id = rocprofiler_agent_id_t{(uint64_t)queue_info_session->agent.handle};
record.kernel_properties = pending.kernel_properties;
record.thread_id = rocprofiler_thread_id_t{pending.thread_id};
record.queue_idx = rocprofiler_queue_index_t{pending.queue_index};
+5 -2
View File
@@ -482,12 +482,15 @@ void plugins_load(void* userdata) {
else
plugin_name = "libcli_plugin.so";
}
env_var_replace("OUTPUT_PATH");
bool bIsATT = std::string_view(plugin_name) == "libatt_plugin.so";
if (!bIsATT)
env_var_replace("OUTPUT_PATH");
env_var_replace("OUT_FILE_NAME");
std::string out_path = getenv("OUTPUT_PATH") ? getenv("OUTPUT_PATH") : "";
if (out_path.size()) {
if (out_path.size() && !bIsATT) {
try {
std::experimental::filesystem::create_directories(out_path);
} catch (...) {