diff --git a/projects/rocprofiler/plugin/ctf/plugin.cpp b/projects/rocprofiler/plugin/ctf/plugin.cpp index f2f0e154ab..34b8b30166 100644 --- a/projects/rocprofiler/plugin/ctf/plugin.cpp +++ b/projects/rocprofiler/plugin/ctf/plugin.cpp @@ -136,9 +136,8 @@ class RocTxEventRecord final : public TracerEventRecord { explicit RocTxEventRecord(const rocprofiler_record_tracer_t& record, const rocprofiler_session_id_t session_id) : TracerEventRecord{record, GetRecordBeginClockVal(record)}, - id_{record.operation_id.id}, - msg_{ - rocprofiler::cxx_demangle(reinterpret_cast(record.api_data_handle.handle))} { + id_{record.operation_id.id} { + msg_ = record.name ? record.name : ""; } void Write(barectf_roctx_ctx& barectf_ctx) const override { diff --git a/projects/rocprofiler/plugin/file/file.cpp b/projects/rocprofiler/plugin/file/file.cpp index 7e7282ca2d..2992ce86d0 100644 --- a/projects/rocprofiler/plugin/file/file.cpp +++ b/projects/rocprofiler/plugin/file/file.cpp @@ -260,13 +260,14 @@ class file_plugin_t { } } if (tracer_record.domain == ACTIVITY_DOMAIN_ROCTX) { - *output_file << " timestamp(" << tracer_record.timestamps.begin.value << "),"; + *output_file << " timestamp(" << tracer_record.timestamps.begin.value << ")"; } else if (tracer_record.phase == ROCPROFILER_PHASE_EXIT || tracer_record.phase == ROCPROFILER_PHASE_NONE) { *output_file << " Begin(" << tracer_record.timestamps.begin.value << "), End(" - << tracer_record.timestamps.end.value << "),"; + << tracer_record.timestamps.end.value << ")"; } - *output_file << " Correlation_ID(" << tracer_record.correlation_id.value << ")"; + if (tracer_record.domain != ACTIVITY_DOMAIN_ROCTX) + *output_file << ", Correlation_ID(" << tracer_record.correlation_id.value << ")"; *output_file << std::endl; } diff --git a/projects/rocprofiler/plugin/perfetto/perfetto.cpp b/projects/rocprofiler/plugin/perfetto/perfetto.cpp index 184b27edf4..082a0f21e5 100644 --- a/projects/rocprofiler/plugin/perfetto/perfetto.cpp +++ b/projects/rocprofiler/plugin/perfetto/perfetto.cpp @@ -425,7 +425,7 @@ class perfetto_plugin_t { } auto& roctx_track = roctx_track_it->second; roctx_id = tracer_record.operation_id.id; - roctx_message = std::string(reinterpret_cast(tracer_record.name)); + roctx_message = tracer_record.name ? tracer_record.name : ""; if (tracer_record.operation_id.id == 1) { perfetto::StaticString roctx_message_pft( (!roctx_message.empty() ? roctx_message.c_str() : "")); diff --git a/projects/rocprofiler/src/tools/tool.cpp b/projects/rocprofiler/src/tools/tool.cpp index 5ec6f39784..c5add79e8c 100644 --- a/projects/rocprofiler/src/tools/tool.cpp +++ b/projects/rocprofiler/src/tools/tool.cpp @@ -161,7 +161,7 @@ struct roctx_trace_entry_t { : valid(rocprofiler::TRACE_ENTRY_INIT) { record = tracer_record; record.name = roctx_message_str ? strdup(roctx_message_str) : nullptr; - record.api_data_handle.handle = roctx_message_str; + record.api_data_handle.handle = record.name; } ~roctx_trace_entry_t() { if (record.name != nullptr) free(const_cast(record.name));