From ad2ba3a0cc2a2d1baeb00ece47134317a88baa45 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Tue, 31 Dec 2019 20:56:53 -0600 Subject: [PATCH] minor cosmetic changes Change-Id: If148618105092923c869b99b8fabd9ce721c50dc [ROCm/rocprofiler commit: b534d4513a81822ea49992f1f1313b168b996aa6] --- projects/rocprofiler/inc/rocprofiler.h | 24 +++++++++---------- projects/rocprofiler/src/core/rocprofiler.cpp | 8 +++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/projects/rocprofiler/inc/rocprofiler.h b/projects/rocprofiler/inc/rocprofiler.h index a1473d18a2..dc00d83373 100644 --- a/projects/rocprofiler/inc/rocprofiler.h +++ b/projects/rocprofiler/inc/rocprofiler.h @@ -199,6 +199,18 @@ hsa_status_t rocprofiler_close(rocprofiler_t* context); // [in] profiling conte hsa_status_t rocprofiler_reset(rocprofiler_t* context, // [in] profiling context uint32_t group_index); // group index +// Supported time value ID +typedef enum { + ROCPROFILER_TIME_ID_CLOCK_REALTIME = 0, // Linux realtime clock time + ROCPROFILER_TIME_ID_CLOCK_MONOTONIC = 1, // Linux monotonic clock time +} rocprofiler_time_id_t; + +// Return time value for a given time ID and profiling timestamp +hsa_status_t rocprofiler_get_time( + rocprofiler_time_id_t time_id, // identifier of the particular time to convert the timesatmp + uint64_t timestamp, // profiling timestamp + uint64_t* value_ns); // [out] returned time 'ns' value + //////////////////////////////////////////////////////////////////////////////// // Queue callbacks // @@ -383,18 +395,6 @@ hsa_status_t rocprofiler_queue_create_profiled( void* data, uint32_t private_segment_size, uint32_t group_segment_size, hsa_queue_t** queue); -// Convert profiler time -typedef enum { - ROCPROFILER_TIME_ID_CLOCK_REALTIME = 0, - ROCPROFILER_TIME_ID_CLOCK_MONOTONIC = 1, -} rocprofiler_time_id_t; - -// Return time for a given time ID and profiling timetsamp value -hsa_status_t rocprofiler_get_time( - rocprofiler_time_id_t time_id, // identifier of the particular time to convert the timesatmp - uint64_t value, // profiling timestamp value - uint64_t* time); // returned time - //////////////////////////////////////////////////////////////////////////////// // Profiling pool // diff --git a/projects/rocprofiler/src/core/rocprofiler.cpp b/projects/rocprofiler/src/core/rocprofiler.cpp index d553db36e1..3f1362a71e 100644 --- a/projects/rocprofiler/src/core/rocprofiler.cpp +++ b/projects/rocprofiler/src/core/rocprofiler.cpp @@ -843,13 +843,13 @@ PUBLIC_API hsa_status_t rocprofiler_queue_create_profiled( return rocprofiler::InterceptQueue::QueueCreateTracked(agent, size, type, callback, data, private_segment_size, group_segment_size, queue); } -// Return time for a given time ID and profiling timetsamp value +// Return time value for a given time ID and profiling timestamp hsa_status_t rocprofiler_get_time( rocprofiler_time_id_t time_id, - uint64_t value, - uint64_t* time) + uint64_t timestamp, + uint64_t* value_ns) { - return rocprofiler::util::HsaRsrcFactory::Instance().GetTime(time_id, value, time); + return rocprofiler::util::HsaRsrcFactory::Instance().GetTime(time_id, timestamp, value_ns); } } // extern "C"