diff options
author | Finn Williams <Finn.Williams@arm.com> | 2019-10-22 10:30:49 +0100 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2019-11-07 12:20:47 +0000 |
commit | e63a026bd987e78bdaa5b94c3e53201b62011faa (patch) | |
tree | cad6e7dcc7107b723ecc92116a96eda80100a99e /tests/profiling/timelineDecoder/TimelineDirectoryCaptureCommandHandler.hpp | |
parent | 362e03214ceceb95ec30d530ff84e8d9efc198d7 (diff) | |
download | armnn-e63a026bd987e78bdaa5b94c3e53201b62011faa.tar.gz |
IVGCVSW-3951 Create the timeline decoder
* Added ITimelineDecoder.h C interface
* Added an example implementation of ITimelineDecoder.h
* Added command handlers for the timeline directory and objects
* Added tests for the decoder implementation
* Changed ReadSwTraceMessage to take a const unsigned char*
so it can be used by the directory command handler
* Fixed some bugs in ProfilingUtils.cpp and related tests
Change-Id: If06faf1fe0274a8f022f194a6d3527f5ce5374c6
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Diffstat (limited to 'tests/profiling/timelineDecoder/TimelineDirectoryCaptureCommandHandler.hpp')
-rw-r--r-- | tests/profiling/timelineDecoder/TimelineDirectoryCaptureCommandHandler.hpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/profiling/timelineDecoder/TimelineDirectoryCaptureCommandHandler.hpp b/tests/profiling/timelineDecoder/TimelineDirectoryCaptureCommandHandler.hpp new file mode 100644 index 0000000000..3a575d7fef --- /dev/null +++ b/tests/profiling/timelineDecoder/TimelineDirectoryCaptureCommandHandler.hpp @@ -0,0 +1,47 @@ +// +// Copyright © 2019 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + + +#include <CommandHandlerFunctor.hpp> +#include <Packet.hpp> +#include <PacketBuffer.hpp> +#include <ProfilingUtils.hpp> + +namespace armnn +{ + +namespace gatordmock +{ + +class TimelineDirectoryCaptureCommandHandler : public profiling::CommandHandlerFunctor +{ + // Utils + uint32_t uint32_t_size = sizeof(uint32_t); + +public: + TimelineDirectoryCaptureCommandHandler(uint32_t familyId, + uint32_t packetId, + uint32_t version, + bool quietOperation = false) + : CommandHandlerFunctor(familyId, packetId, version) + , m_QuietOperation(quietOperation) + {} + + void operator()(const armnn::profiling::Packet& packet) override; + + std::vector<profiling::SwTraceMessage> m_SwTraceMessages; + +private: + void ParseData(const armnn::profiling::Packet& packet); + void Print(); + + bool m_QuietOperation; +}; + +} //namespace gatordmock + +} //namespace armnn
\ No newline at end of file |