From 1fdeb99ca83bac83e0cacb332880e2e62dd22198 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Thu, 9 Jul 2020 07:28:37 +0100 Subject: IVGCVSW-5095 Make timeline report the Linux Thread ID not the pthread ID Change-Id: Id69519fd9ef57716de4e389ed4156710a904c701 Signed-off-by: Jim Flynn --- src/profiling/test/TimelinePacketTests.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/profiling/test/TimelinePacketTests.cpp') diff --git a/src/profiling/test/TimelinePacketTests.cpp b/src/profiling/test/TimelinePacketTests.cpp index 96e9bf2400..71c6915a8c 100644 --- a/src/profiling/test/TimelinePacketTests.cpp +++ b/src/profiling/test/TimelinePacketTests.cpp @@ -3,6 +3,7 @@ // SPDX-License-Identifier: MIT // +#include #include #include @@ -724,7 +725,7 @@ BOOST_AUTO_TEST_CASE(TimelineEventClassTestFullConstructionOfData) BOOST_AUTO_TEST_CASE(TimelineEventPacketTestNoBuffer) { const uint64_t timestamp = 456789u; - const std::thread::id threadId = std::this_thread::get_id(); + const int threadId = armnnUtils::Threads::GetCurrentThreadId(); const uint64_t profilingGuid = 123456u; unsigned int numberOfBytesWritten = 789u; TimelinePacketStatus result = WriteTimelineEventBinary(timestamp, @@ -742,7 +743,7 @@ BOOST_AUTO_TEST_CASE(TimelineEventPacketTestBufferExhaustionZeroValue) std::vector buffer(512, 0); const uint64_t timestamp = 456789u; - const std::thread::id threadId = std::this_thread::get_id(); + const int threadId = armnnUtils::Threads::GetCurrentThreadId(); const uint64_t profilingGuid = 123456u; unsigned int numberOfBytesWritten = 789u; TimelinePacketStatus result = WriteTimelineEventBinary(timestamp, @@ -760,7 +761,7 @@ BOOST_AUTO_TEST_CASE(TimelineEventPacketTestBufferExhaustionFixedValue) std::vector buffer(10, 0); const uint64_t timestamp = 456789u; - const std::thread::id threadId = std::this_thread::get_id(); + const int threadId = armnnUtils::Threads::GetCurrentThreadId(); const uint64_t profilingGuid = 123456u; unsigned int numberOfBytesWritten = 789u; TimelinePacketStatus result = WriteTimelineEventBinary(timestamp, @@ -778,7 +779,7 @@ BOOST_AUTO_TEST_CASE(TimelineEventPacketTestFullConstructionOfData) std::vector buffer(512, 0); const uint64_t timestamp = 456789u; - const std::thread::id threadId = std::this_thread::get_id(); + const int threadId = armnnUtils::Threads::GetCurrentThreadId(); const uint64_t profilingGuid = 123456u; unsigned int numberOfBytesWritten = 789u; TimelinePacketStatus result = WriteTimelineEventBinary(timestamp, -- cgit v1.2.1