IVGCVSW-4900 Update Timeline Directory Message with new fields
Change-Id: I68097e176f7471a18498492b50339e68004dddd5
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index d7e4628..247b945 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 @@
m_SendCounterPacket,
m_SendTimelinePacket,
m_StateMachine,
+ *this,
m_BackendProfilingContexts)
, m_RequestCounterDirectoryCommandHandler(0,
3,
@@ -123,6 +124,7 @@
*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 @@
/// 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 @@
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 @@
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