From efe7000e7b2eafefdf5b009cd24c3ebac9f3ce15 Mon Sep 17 00:00:00 2001 From: Laurent Morichetti Date: Wed, 4 May 2022 11:59:06 -0700 Subject: [PATCH] Remove unused ROCTX_CLOCK_TIME Change-Id: I9696bb2892fe6fe21089462d624643b7a782fb71 [ROCm/roctracer commit: f46d1717ccda88a784617733bc4fdc352c302f35] --- projects/roctracer/test/tool/tracer_tool.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/projects/roctracer/test/tool/tracer_tool.cpp b/projects/roctracer/test/tool/tracer_tool.cpp index aa305c21ab..59dc041f8b 100644 --- a/projects/roctracer/test/tool/tracer_tool.cpp +++ b/projects/roctracer/test/tool/tracer_tool.cpp @@ -249,14 +249,9 @@ roctracer::TraceBuffer* roctx_trace_buffer = NULL; // rocTX callback function static inline void roctx_callback_fun(uint32_t domain, uint32_t cid, uint32_t tid, roctx_range_id_t rid, const char* message) { -#if ROCTX_CLOCK_TIME - const timestamp_t time = HsaTimer::clocktime_ns(HsaTimer::TIME_ID_CLOCK_MONOTONIC); -#else - const timestamp_t time = timer->timestamp_fn_ns(); -#endif roctx_trace_entry_t* entry = roctx_trace_buffer->GetEntry(); entry->cid = cid; - entry->time = time; + entry->time = timer->timestamp_fn_ns(); entry->pid = GetPid(); entry->tid = tid; entry->rid = rid; @@ -287,15 +282,8 @@ void stop_callback() { // rocTX buffer flush function void roctx_flush_cb(roctx_trace_entry_t* entry) { -#if ROCTX_CLOCK_TIME - timestamp_t timestamp = 0; - HsaRsrcFactory::Instance().GetTimestamp(HsaTimer::TIME_ID_CLOCK_MONOTONIC, entry->time, - ×tamp); -#else - const timestamp_t timestamp = entry->time; -#endif std::ostringstream os; - os << timestamp << " " << entry->pid << ":" << entry->tid << " " << entry->cid << ":" + os << entry->time << " " << entry->pid << ":" << entry->tid << " " << entry->cid << ":" << entry->rid; if (entry->message != NULL) os << ":\"" << entry->message << "\"";