From 1e1bef12cc6b616290290ac715c59cb38234b9bf Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Tue, 20 Nov 2018 16:54:42 +0000 Subject: COMPMID-1777: Output queued and flushed timestamps too Change-Id: I376d29aa6ec1b52d978c4d49de63c6713d6036e3 --- tests/framework/instruments/OpenCLTimer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/framework') diff --git a/tests/framework/instruments/OpenCLTimer.cpp b/tests/framework/instruments/OpenCLTimer.cpp index fefc891d91..2fd5714f65 100644 --- a/tests/framework/instruments/OpenCLTimer.cpp +++ b/tests/framework/instruments/OpenCLTimer.cpp @@ -183,7 +183,9 @@ Instrument::MeasurementsMap OpenCLClock::measurements() const unsigned int kernel_number = 0; for(auto kernel : _kernels) { - cl_ulong start, end; + cl_ulong queued, flushed, start, end; + kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_QUEUED, &queued); + kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_SUBMIT, &flushed); kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_START, &start); kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_END, &end); std::string name = kernel.name + " #" + support::cpp11::to_string(kernel_number++); @@ -191,6 +193,8 @@ Instrument::MeasurementsMap OpenCLClock::measurements() const if(output_timestamps) { measurements.emplace("[start]" + name, Measurement(start / static_cast(_scale_factor), _unit)); + measurements.emplace("[queued]" + name, Measurement(queued / static_cast(_scale_factor), _unit)); + measurements.emplace("[flushed]" + name, Measurement(flushed / static_cast(_scale_factor), _unit)); measurements.emplace("[end]" + name, Measurement(end / static_cast(_scale_factor), _unit)); } else -- cgit v1.2.1