From 6398a98ac273931cc0b3ab33222d255d1edf48b0 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Wed, 27 May 2020 17:05:21 +0100 Subject: IVGCVSW-4900 Update Timeline Directory Message with new fields Change-Id: I68097e176f7471a18498492b50339e68004dddd5 Signed-off-by: Jim Flynn --- src/profiling/ProfilingService.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/profiling/ProfilingService.hpp') 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 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 -- cgit v1.2.1