aboutsummaryrefslogtreecommitdiff
path: root/src/timelineDecoder/tests
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2020-07-09 07:28:37 +0100
committerJim Flynn <jim.flynn@arm.com>2020-07-09 13:48:46 +0100
commit1fdeb99ca83bac83e0cacb332880e2e62dd22198 (patch)
tree76aa91baf9d3b7306b2fa15e1a50dc0bbfe3af26 /src/timelineDecoder/tests
parent86953ed331027bd557a80d782d5ee99298de35c4 (diff)
downloadarmnn-1fdeb99ca83bac83e0cacb332880e2e62dd22198.tar.gz
IVGCVSW-5095 Make timeline report the Linux Thread ID not the pthread ID
Change-Id: Id69519fd9ef57716de4e389ed4156710a904c701 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/timelineDecoder/tests')
-rw-r--r--src/timelineDecoder/tests/TimelineTests.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/timelineDecoder/tests/TimelineTests.cpp b/src/timelineDecoder/tests/TimelineTests.cpp
index 8d0b8a0f08..08d29d0f6a 100644
--- a/src/timelineDecoder/tests/TimelineTests.cpp
+++ b/src/timelineDecoder/tests/TimelineTests.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2019 Arm Ltd. All rights reserved.
+// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -8,6 +8,7 @@
#include <TimelineDecoder.hpp>
#include <CommandHandlerFunctor.hpp>
+#include <Threads.hpp>
#include <ProfilingService.hpp>
#include <PacketBuffer.hpp>
#include <TimelinePacketWriterFactory.hpp>
@@ -172,7 +173,7 @@ BOOST_AUTO_TEST_CASE(TimelineCaptureTest)
const uint64_t timestamp = 33333u;
const uint64_t eventGuid = 44444u;
- const std::thread::id threadId = std::this_thread::get_id();
+ const int threadId = armnnUtils::Threads::GetCurrentThreadId();
// need to do a bit of work here to extract the value from threadId
unsigned char* uCharThreadId = new unsigned char[armnn::profiling::ThreadIdSize]();;
@@ -285,7 +286,7 @@ BOOST_AUTO_TEST_CASE(TimelineCaptureTestMultipleStringsInBuffer)
const uint64_t timestamp = 33333u;
const uint64_t eventGuid = 44444u;
- const std::thread::id threadId = std::this_thread::get_id();
+ const int threadId = armnnUtils::Threads::GetCurrentThreadId();
// need to do a bit of work here to extract the value from threadId
unsigned char* uCharThreadId = new unsigned char[armnn::profiling::ThreadIdSize]();