From d9afb4322fecf4180f11954c26a79b7febaeb214 Mon Sep 17 00:00:00 2001 From: Giovanni LB Date: Thu, 18 May 2023 17:34:41 -0300 Subject: [PATCH] SWDEV-399505: Updated file.cpp from amd-staging Change-Id: I8b43f98fc0fa3c7d928bcc58067fddb01018b607 [ROCm/rocprofiler commit: 099a6b88b956865e584b730fad7a786b02ed635f] --- projects/rocprofiler/plugin/file/file.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/projects/rocprofiler/plugin/file/file.cpp b/projects/rocprofiler/plugin/file/file.cpp index b8fbaf4164..51fd054a6f 100644 --- a/projects/rocprofiler/plugin/file/file.cpp +++ b/projects/rocprofiler/plugin/file/file.cpp @@ -233,6 +233,7 @@ class file_plugin_t { tracer_record.api_data_handle, tracer_record.operation_id, &function_name_c)); } } + //return; output_file_t* output_file = get_output_file(output_type_t::TRACER, tracer_record.domain); *output_file << "Record(" << tracer_record.header.id.handle << "), Domain(" << GetDomainName(tracer_record.domain) << "),"; @@ -286,10 +287,10 @@ class file_plugin_t { profiler_record->kernel_id, &kernel_name_c)); } *output_file << std::string("dispatch[") << std::to_string(profiler_record->header.id.handle) - << "], " << std::string("gpu-id(") + << "], " << std::string("gpu_id(") << std::to_string(profiler_record->gpu_id.handle) << "), " - << std::string("queue-id(") << std::to_string(profiler_record->queue_id.handle) - << "), " << std::string("queue-index(") + << std::string("queue_id(") << std::to_string(profiler_record->queue_id.handle) + << "), " << std::string("queue_index(") << std::to_string(profiler_record->queue_idx.value) << "), " << std::string("pid(") << std::to_string(GetPid()) << "), " << std::string("tid(") << std::to_string(profiler_record->thread_id.value) << ")"; @@ -321,9 +322,9 @@ class file_plugin_t { << std::to_string(profiler_record->kernel_id.handle) << "), " << std::string("kernel-name(\"") << kernel_name << "\")" << std::string(", start_time(") - << std::string(", time(0,") - << std::to_string(profiler_record->timestamps.begin.value) << "," - << std::to_string(profiler_record->timestamps.end.value) << ",0)"; + << std::to_string(profiler_record->timestamps.begin.value) << ")" + << std::string(", end_time(") + << std::to_string(profiler_record->timestamps.end.value) << ")"; // For Counters *output_file << std::endl; @@ -339,7 +340,7 @@ class file_plugin_t { CHECK_ROCPROFILER(rocprofiler_query_counter_info( session_id, ROCPROFILER_COUNTER_NAME, profiler_record->counters[i].counter_handler, &name_c)); - *output_file << " " << name_c << " (" + *output_file << ", " << name_c << " (" << std::to_string(profiler_record->counters[i].value.value) << ")" << std::endl; }