diff options
author | Jim Flynn <jim.flynn@arm.com> | 2020-05-27 17:05:21 +0100 |
---|---|---|
committer | finn.williams <finn.williams@arm.com> | 2020-06-17 12:16:36 +0000 |
commit | 6398a98ac273931cc0b3ab33222d255d1edf48b0 (patch) | |
tree | 39998f4ed9af5d4fcdb3aa7ed11ca101b917f07d /src/profiling/ProfilingService.hpp | |
parent | 96becb7e4f5f510344c3850278a706d63a564fc4 (diff) | |
download | armnn-6398a98ac273931cc0b3ab33222d255d1edf48b0.tar.gz |
IVGCVSW-4900 Update Timeline Directory Message with new fields
Change-Id: I68097e176f7471a18498492b50339e68004dddd5
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r-- | src/profiling/ProfilingService.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp index d7e4628f68..247b945813 100644 --- a/src/profiling/ProfilingService.hpp +++ b/src/profiling/ProfilingService.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd. All rights reserved. +// Copyright © 2019 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -82,6 +82,7 @@ public: m_SendCounterPacket, m_SendTimelinePacket, m_StateMachine, + *this, m_BackendProfilingContexts) , m_RequestCounterDirectoryCommandHandler(0, 3, @@ -123,6 +124,7 @@ public: *this) , m_TimelinePacketWriterFactory(m_BufferManager) , m_MaxGlobalCounterId(armnn::profiling::INFERENCES_RUN) + , m_ServiceActive(false) { // Register the "Connection Acknowledged" command handler m_CommandHandlerRegistry.RegisterFunctor(&m_ConnectionAcknowledgedCommandHandler); @@ -193,6 +195,7 @@ public: /// Create a ProfilingStaticGuid based on a hash of the string ProfilingStaticGuid GenerateStaticId(const std::string& str) override; + std::unique_ptr<ISendTimelinePacket> GetSendTimelinePacket() const override; ISendCounterPacket& GetSendCounterPacket() override @@ -204,12 +207,18 @@ public: static ProfilingStaticGuid GetStaticId(const std::string& str); + void ResetGuidGenerator(); + bool IsTimelineReportingEnabled() { return m_TimelineReporting; } void AddLocalPacketHandler(ILocalPacketHandlerSharedPtr localPacketHandler); + + void NotifyProfilingServiceActive() override; // IProfilingServiceStatus + void WaitForProfilingServiceActivation(unsigned int timeout) override; // IProfilingServiceStatus + private: //Copy/move constructors/destructors and copy/move assignment operators are deleted ProfilingService(const ProfilingService&) = delete; @@ -261,6 +270,11 @@ private: static ProfilingGuidGenerator m_GuidGenerator; + // Signalling to let external actors know when service is active or not + std::mutex m_ServiceActiveMutex; + std::condition_variable m_ServiceActiveConditionVariable; + bool m_ServiceActive; + protected: // Protected methods for testing |