IVGCVSW-3971 Implement the Per-Job Counter Selection command handler
* Added new PerJobCounterSelectionCommandHandler class
* The new handler drops the incoming packet without altering the
state of the profiling service
* Added unit test
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: I2b1bb803318a9e6c438391a0985893eb412e7787
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index d4fa856..1afcb1c 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -16,6 +16,7 @@
#include "ConnectionAcknowledgedCommandHandler.hpp"
#include "RequestCounterDirectoryCommandHandler.hpp"
#include "PeriodicCounterSelectionCommandHandler.hpp"
+#include "PerJobCounterSelectionCommandHandler.hpp"
namespace armnn
{
@@ -96,6 +97,7 @@
ConnectionAcknowledgedCommandHandler m_ConnectionAcknowledgedCommandHandler;
RequestCounterDirectoryCommandHandler m_RequestCounterDirectoryCommandHandler;
PeriodicCounterSelectionCommandHandler m_PeriodicCounterSelectionCommandHandler;
+ PerJobCounterSelectionCommandHandler m_PerJobCounterSelectionCommandHandler;
protected:
// Default constructor/destructor kept protected for testing
@@ -131,6 +133,9 @@
*this,
m_SendCounterPacket,
m_StateMachine)
+ , m_PerJobCounterSelectionCommandHandler(5,
+ m_PacketVersionResolver.ResolvePacketVersion(4).GetEncodedValue(),
+ m_StateMachine)
{
// Register the "Connection Acknowledged" command handler
m_CommandHandlerRegistry.RegisterFunctor(&m_ConnectionAcknowledgedCommandHandler);
@@ -140,6 +145,9 @@
// Register the "Periodic Counter Selection" command handler
m_CommandHandlerRegistry.RegisterFunctor(&m_PeriodicCounterSelectionCommandHandler);
+
+ // Register the "Per-Job Counter Selection" command handler
+ m_CommandHandlerRegistry.RegisterFunctor(&m_PerJobCounterSelectionCommandHandler);
}
~ProfilingService() = default;