diff --git a/rocclr/device/rocm/rocvirtual.cpp b/rocclr/device/rocm/rocvirtual.cpp index 2ecfc53ef3..75f8f4a797 100644 --- a/rocclr/device/rocm/rocvirtual.cpp +++ b/rocclr/device/rocm/rocvirtual.cpp @@ -36,6 +36,7 @@ #include "os/os.hpp" #include "hsa/amd_hsa_kernel_code.h" #include "hsa/amd_hsa_queue.h" +#include "hsa/amd_hsa_signal.h" #include #include @@ -143,6 +144,8 @@ void Timestamp::checkGpuTime() { if (command().GetBatchHead() == nullptr || command().profilingInfo().marker_ts_ || command().type() == CL_COMMAND_TASK) { hsa_amd_profiling_dispatch_time_t time = {}; + amd_signal_t* amdSignal = reinterpret_cast(it->signal_.handle); + if (it->engine_ == HwQueueEngine::Compute) { hsa_amd_profiling_get_dispatch_time(gpu()->gpu_device(), it->signal_, &time); } else { @@ -159,9 +162,10 @@ void Timestamp::checkGpuTime() { static_cast(command()).addTimestamps(time.start, time.end); } - ClPrint(amd::LOG_INFO, amd::LOG_SIG, "Signal = (0x%lx), start = %ld, " - "end = %ld time taken= %ld ns", it->signal_.handle, time.start, time.end, - time.end - time.start); + ClPrint(amd::LOG_INFO, amd::LOG_TS, "Signal = (0x%lx), Translated start/end = %ld / %ld, " + "Elapsed = %ld ns, ticks start/end = %ld / %ld, Ticks elapsed = %ld", it->signal_.handle, + time.start, time.end, time.end - time.start, amdSignal->start_ts, amdSignal->end_ts, + amdSignal->end_ts - amdSignal->start_ts); } it->flags_.done_ = true; } diff --git a/rocclr/utils/debug.hpp b/rocclr/utils/debug.hpp index c8c362568c..1fa864c1e5 100644 --- a/rocclr/utils/debug.hpp +++ b/rocclr/utils/debug.hpp @@ -57,6 +57,7 @@ enum LogMask { LOG_LOCATION = 65536, //!< (0x10000) Log message location LOG_MEM = 131072, //!< (0x20000) Memory allocation LOG_MEM_POOL = 262144, //!< (0x40000) Memory pool allocation, including memory in graphs + LOG_TS = 524288, //!< (0x80000) Timestamp details LOG_ALWAYS = -1 //!< (0xFFFFFFFF) Log always even mask flag is zero };