From fe5a24beeef6e9a41366e694f41093565e748048 Mon Sep 17 00:00:00 2001 From: Finn Williams Date: Thu, 9 Apr 2020 16:05:28 +0100 Subject: IVGCVSW-4666 Call EnableProfiling when state switches to active * Move the call to EnableProfiling() into ConnectionAcknowledgedHandler * Fix an issue with MockGatord forcing some command handlers to be quiet * Add some small unrelated improvements and typo fixes to the periodic counter command handlers Signed-off-by: Finn Williams Change-Id: I9e6066b78d1f782cfaf27c11571c0ec5cb5d126f --- src/profiling/ConnectionAcknowledgedCommandHandler.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/profiling/ConnectionAcknowledgedCommandHandler.hpp') diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp index 6054306da8..e2bdff8e96 100644 --- a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp +++ b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp @@ -5,11 +5,13 @@ #pragma once +#include #include "CommandHandlerFunctor.hpp" #include "ISendCounterPacket.hpp" #include "armnn/profiling/ISendTimelinePacket.hpp" #include "Packet.hpp" #include "ProfilingStateMachine.hpp" +#include namespace armnn { @@ -20,6 +22,9 @@ namespace profiling class ConnectionAcknowledgedCommandHandler final : public CommandHandlerFunctor { +typedef const std::unordered_map>& + BackendProfilingContexts; + public: ConnectionAcknowledgedCommandHandler(uint32_t familyId, uint32_t packetId, @@ -27,12 +32,14 @@ public: ICounterDirectory& counterDirectory, ISendCounterPacket& sendCounterPacket, ISendTimelinePacket& sendTimelinePacket, - ProfilingStateMachine& profilingStateMachine) + ProfilingStateMachine& profilingStateMachine, + Optional backendProfilingContexts = EmptyOptional()) : CommandHandlerFunctor(familyId, packetId, version) , m_CounterDirectory(counterDirectory) , m_SendCounterPacket(sendCounterPacket) , m_SendTimelinePacket(sendTimelinePacket) , m_StateMachine(profilingStateMachine) + , m_BackendProfilingContext(backendProfilingContexts) {} void operator()(const Packet& packet) override; @@ -42,7 +49,7 @@ private: ISendCounterPacket& m_SendCounterPacket; ISendTimelinePacket& m_SendTimelinePacket; ProfilingStateMachine& m_StateMachine; - + Optional m_BackendProfilingContext; }; } // namespace profiling -- cgit v1.2.1