From f621d8a32a7e082a3815823e19bf0b9e3d5e3d34 Mon Sep 17 00:00:00 2001 From: "Welton, Benjamin" Date: Mon, 10 Mar 2025 14:02:30 -0700 Subject: [PATCH] Add debug printing statement to packet submission (#212) * Add debug printing statement to packet submission Adds debug printing to packets being submitted to HSA Queue in device counting mode. * Minor change * Small fix * formatting --------- Co-authored-by: Benjamin Welton Co-authored-by: Kandula, Venkateshwar reddy [ROCm/rocprofiler-sdk commit: f7e94c1ee8d4ef089618fd31fe3de2096a4d90fa] --- .../source/lib/rocprofiler-sdk/counters/device_counting.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/device_counting.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/device_counting.cpp index 88543a834b..93db2f494a 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/device_counting.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/device_counting.cpp @@ -28,6 +28,7 @@ #include "lib/rocprofiler-sdk/counters/core.hpp" #include "lib/rocprofiler-sdk/counters/id_decode.hpp" #include "lib/rocprofiler-sdk/hsa/agent_cache.hpp" +#include "lib/rocprofiler-sdk/hsa/details/fmt.hpp" #include "lib/rocprofiler-sdk/hsa/hsa.hpp" #include "lib/rocprofiler-sdk/hsa/queue_controller.hpp" #include "lib/rocprofiler-sdk/hsa/rocprofiler_packet.hpp" @@ -82,6 +83,10 @@ submitPacket(hsa_queue_t* queue, const void* packet) // ringdoor bell hsa::get_core_table()->hsa_signal_store_relaxed_fn(queue->doorbell_signal, write_idx); + ROCP_TRACE << fmt::format("SLOT_IDX: {} WRITE_IDX: {} PKT: {}", + slot_idx, + write_idx, + *static_cast(packet)); return write_idx; }