aboutsummaryrefslogtreecommitdiff
path: root/tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2020-02-21 11:14:08 +0000
committerJim Flynn <jim.flynn@arm.com>2020-03-02 12:51:36 +0000
commit510f6183d289b176702a18f020449c68be6f1075 (patch)
tree28e8e4f27af5d1ee912c93d47628ec219d37a722 /tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp
parent4c998993bda1475595be5505690ff4e08dc2389e (diff)
downloadarmnn-510f6183d289b176702a18f020449c68be6f1075.tar.gz
IVGCVSW-4164 Change the callbacks to a C++ pure virtual interface
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I0a15b9f228ceb5a8393a48571b345394c005ee1f
Diffstat (limited to 'tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp')
-rw-r--r--tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp b/tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp
index 3f3240491f..9cdbbdc32a 100644
--- a/tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp
+++ b/tests/profiling/timelineDecoder/TimelineCaptureCommandHandler.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "ITimelineDecoder.h"
+#include "ITimelineDecoder.hpp"
#include <CommandHandlerFunctor.hpp>
#include <Packet.hpp>
@@ -22,7 +22,6 @@ class TimelineCaptureCommandHandler : public profiling::CommandHandlerFunctor
// Utils
uint32_t uint32_t_size = sizeof(uint32_t);
uint32_t uint64_t_size = sizeof(uint64_t);
- uint32_t threadId_size = sizeof(std::thread::id);
using ReadFunction = void (TimelineCaptureCommandHandler::*)(const unsigned char*, uint32_t);
@@ -30,11 +29,11 @@ public:
TimelineCaptureCommandHandler(uint32_t familyId,
uint32_t packetId,
uint32_t version,
- Model* model,
- bool quietOperation = false)
+ ITimelineDecoder& timelineDecoder,
+ uint32_t threadId_size)
: CommandHandlerFunctor(familyId, packetId, version)
- , m_Model(model)
- , m_QuietOperation(quietOperation)
+ , m_TimelineDecoder(timelineDecoder)
+ , m_ThreadIdSize(threadId_size)
{}
void operator()(const armnn::profiling::Packet& packet) override;
@@ -45,20 +44,12 @@ public:
void ReadRelationship(const unsigned char* data, uint32_t offset);
void ReadEvent(const unsigned char* data, uint32_t offset);
- void print();
-
private:
void ParseData(const armnn::profiling::Packet& packet);
- Model* m_Model;
- bool m_QuietOperation;
+ ITimelineDecoder& m_TimelineDecoder;
+ const uint32_t m_ThreadIdSize;
static const ReadFunction m_ReadFunctions[];
-
- void printLabels();
- void printEntities();
- void printEventClasses();
- void printRelationships();
- void printEvents();
};
} //namespace gatordmock