diff --git a/opencl/source/event/event.cpp b/opencl/source/event/event.cpp index 78f7d457ef..7581362c8e 100644 --- a/opencl/source/event/event.cpp +++ b/opencl/source/event/event.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -298,15 +298,18 @@ bool Event::calcProfilingData() { const auto timestamps = timestampPacketContainer->peekNodes(); if (DebugManager.flags.PrintTimestampPacketContents.get()) { + for (auto i = 0u; i < timestamps.size(); i++) { std::cout << "Timestamp " << i << ", " - << "profiling capable: " << timestamps[i]->isProfilingCapable() << ", "; + << "cmd type: " << this->cmdType << ", "; for (auto j = 0u; j < timestamps[i]->getPacketsUsed(); j++) { std::cout << "packet " << j << ": " << "global start: " << timestamps[i]->getGlobalStartValue(j) << ", " << "global end: " << timestamps[i]->getGlobalEndValue(j) << ", " << "context start: " << timestamps[i]->getContextStartValue(j) << ", " - << "context end: " << timestamps[i]->getContextEndValue(j) << std::endl; + << "context end: " << timestamps[i]->getContextEndValue(j) << ", " + << "global delta: " << timestamps[i]->getGlobalEndValue(j) - timestamps[i]->getGlobalStartValue(j) << ", " + << "context delta: " << timestamps[i]->getContextEndValue(j) - timestamps[i]->getContextStartValue(j) << std::endl; } } } diff --git a/opencl/test/unit_test/profiling/profiling_tests.cpp b/opencl/test/unit_test/profiling/profiling_tests.cpp index 9853581a75..aa9a031499 100644 --- a/opencl/test/unit_test/profiling/profiling_tests.cpp +++ b/opencl/test/unit_test/profiling/profiling_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -1326,13 +1326,15 @@ TEST_F(ProfilingTimestampPacketsTest, givenPrintTimestampPacketContentsSetWhenCa std::string output = testing::internal::GetCapturedStdout(); std::stringstream expected; - expected << "Timestamp 0, profiling capable: " << ev->timestampPacketContainer->peekNodes()[0]->isProfilingCapable() << ", "; + expected << "Timestamp 0, cmd type: " << ev->getCommandType() << ", "; for (int i = 0; i < 16; i++) { expected << "packet " << i << ": " << "global start: " << globalStart[i] << ", " << "global end: " << globalEnd[i] << ", " << "context start: " << contextStart[i] << ", " - << "context end: " << contextEnd[i] << std::endl; + << "context end: " << contextEnd[i] << ", " + << "global delta: " << globalEnd[i] - globalStart[i] << ", " + << "context delta: " << contextEnd[i] - contextStart[i] << std::endl; } EXPECT_EQ(0, output.compare(expected.str().c_str())); }