aboutsummaryrefslogtreecommitdiff
path: root/src/profiling
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling')
-rw-r--r--src/profiling/ActivateTimelineReportingCommandHandler.hpp7
-rw-r--r--src/profiling/CommandHandlerFunctor.hpp2
-rw-r--r--src/profiling/ConnectionAcknowledgedCommandHandler.hpp3
-rw-r--r--src/profiling/DeactivateTimelineReportingCommandHandler.hpp2
-rw-r--r--src/profiling/FileOnlyProfilingConnection.hpp2
-rw-r--r--src/profiling/IProfilingConnection.hpp2
-rw-r--r--src/profiling/Packet.hpp89
-rw-r--r--src/profiling/PerJobCounterSelectionCommandHandler.hpp2
-rw-r--r--src/profiling/PeriodicCounterCapture.hpp2
-rw-r--r--src/profiling/PeriodicCounterSelectionCommandHandler.hpp2
-rw-r--r--src/profiling/ProfilingUtils.hpp3
-rw-r--r--src/profiling/RequestCounterDirectoryCommandHandler.hpp2
-rw-r--r--src/profiling/test/PrintPacketHeaderHandler.hpp2
-rw-r--r--src/profiling/test/TestTimelinePacketHandler.hpp3
14 files changed, 19 insertions, 104 deletions
diff --git a/src/profiling/ActivateTimelineReportingCommandHandler.hpp b/src/profiling/ActivateTimelineReportingCommandHandler.hpp
index ac11b46379..a0a2de0888 100644
--- a/src/profiling/ActivateTimelineReportingCommandHandler.hpp
+++ b/src/profiling/ActivateTimelineReportingCommandHandler.hpp
@@ -7,12 +7,15 @@
#include "CommandHandlerFunctor.hpp"
#include "ProfilingStateMachine.hpp"
-#include "Packet.hpp"
#include "SendTimelinePacket.hpp"
#include "IReportStructure.hpp"
-#include "armnn/Optional.hpp"
#include "INotifyBackends.hpp"
+#include "armnn/Optional.hpp"
+
+#include "common/include/Packet.hpp"
+
+
namespace armnn
{
diff --git a/src/profiling/CommandHandlerFunctor.hpp b/src/profiling/CommandHandlerFunctor.hpp
index 743bb937c2..8096c41a3c 100644
--- a/src/profiling/CommandHandlerFunctor.hpp
+++ b/src/profiling/CommandHandlerFunctor.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include <armnn/utility/IgnoreUnused.hpp>
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
index 053d3c32fc..bcd1eed9cb 100644
--- a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
@@ -9,9 +9,8 @@
#include "CommandHandlerFunctor.hpp"
#include "ISendCounterPacket.hpp"
#include "armnn/profiling/ISendTimelinePacket.hpp"
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include "ProfilingStateMachine.hpp"
-#include <future>
namespace armnn
{
diff --git a/src/profiling/DeactivateTimelineReportingCommandHandler.hpp b/src/profiling/DeactivateTimelineReportingCommandHandler.hpp
index e06bae836f..e9ce63db14 100644
--- a/src/profiling/DeactivateTimelineReportingCommandHandler.hpp
+++ b/src/profiling/DeactivateTimelineReportingCommandHandler.hpp
@@ -6,7 +6,7 @@
#pragma once
#include "CommandHandlerFunctor.hpp"
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include "ProfilingStateMachine.hpp"
#include "INotifyBackends.hpp"
diff --git a/src/profiling/FileOnlyProfilingConnection.hpp b/src/profiling/FileOnlyProfilingConnection.hpp
index 466f4f1831..75db477b4f 100644
--- a/src/profiling/FileOnlyProfilingConnection.hpp
+++ b/src/profiling/FileOnlyProfilingConnection.hpp
@@ -8,7 +8,7 @@
#include <armnn/profiling/ILocalPacketHandler.hpp>
#include "DirectoryCaptureCommandHandler.hpp"
#include "IProfilingConnection.hpp"
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include "ProfilingUtils.hpp"
#include "Runtime.hpp"
diff --git a/src/profiling/IProfilingConnection.hpp b/src/profiling/IProfilingConnection.hpp
index 2a1c35f57e..2fc950e4e6 100644
--- a/src/profiling/IProfilingConnection.hpp
+++ b/src/profiling/IProfilingConnection.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include <armnn/profiling/ILocalPacketHandler.hpp>
#include <cstdint>
diff --git a/src/profiling/Packet.hpp b/src/profiling/Packet.hpp
deleted file mode 100644
index c1f2796804..0000000000
--- a/src/profiling/Packet.hpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-
-#pragma once
-
-#include <armnn/Exceptions.hpp>
-
-#include <memory>
-
-namespace armnn
-{
-
-namespace profiling
-{
-
-class Packet
-{
-public:
- Packet()
- : m_Header(0)
- , m_Length(0)
- , m_Data(nullptr)
- {}
-
- Packet(uint32_t header)
- : m_Header(header)
- , m_Length(0)
- , m_Data(nullptr)
- {
- m_PacketId = ((header >> 16) & 1023);
- m_PacketFamily = (header >> 26);
- }
-
- Packet(uint32_t header, uint32_t length, std::unique_ptr<unsigned char[]>& data)
- : m_Header(header)
- , m_Length(length)
- , m_Data(std::move(data))
- {
- m_PacketId = ((header >> 16) & 1023);
- m_PacketFamily = (header >> 26);
-
- if (length == 0 && m_Data != nullptr)
- {
- throw armnn::InvalidArgumentException("Data should be null when length is zero");
- }
- }
-
- Packet(Packet&& other)
- : m_Header(other.m_Header)
- , m_PacketFamily(other.m_PacketFamily)
- , m_PacketId(other.m_PacketId)
- , m_Length(other.m_Length)
- , m_Data(std::move(other.m_Data))
- {
- other.m_Header = 0;
- other.m_PacketFamily = 0;
- other.m_PacketId = 0;
- other.m_Length = 0;
- }
-
- ~Packet() = default;
-
- Packet(const Packet& other) = delete;
- Packet& operator=(const Packet&) = delete;
- Packet& operator=(Packet&&) = default;
-
- uint32_t GetHeader() const { return m_Header; }
- uint32_t GetPacketFamily() const { return m_PacketFamily; }
- uint32_t GetPacketId() const { return m_PacketId; }
- uint32_t GetPacketClass() const { return m_PacketId >> 3; }
- uint32_t GetPacketType() const { return m_PacketId & 7; }
- uint32_t GetLength() const { return m_Length; }
- const unsigned char* GetData() const { return m_Data.get(); }
-
- bool IsEmpty() { return m_Header == 0 && m_Length == 0; }
-
-private:
- uint32_t m_Header;
- uint32_t m_PacketFamily;
- uint32_t m_PacketId;
- uint32_t m_Length;
- std::unique_ptr<unsigned char[]> m_Data;
-};
-
-} // namespace profiling
-
-} // namespace armnn
diff --git a/src/profiling/PerJobCounterSelectionCommandHandler.hpp b/src/profiling/PerJobCounterSelectionCommandHandler.hpp
index 738a4762f9..16cb02a285 100644
--- a/src/profiling/PerJobCounterSelectionCommandHandler.hpp
+++ b/src/profiling/PerJobCounterSelectionCommandHandler.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include "CommandHandlerFunctor.hpp"
#include "ProfilingStateMachine.hpp"
diff --git a/src/profiling/PeriodicCounterCapture.hpp b/src/profiling/PeriodicCounterCapture.hpp
index 51ac273860..796c494480 100644
--- a/src/profiling/PeriodicCounterCapture.hpp
+++ b/src/profiling/PeriodicCounterCapture.hpp
@@ -7,7 +7,7 @@
#include "IPeriodicCounterCapture.hpp"
#include "Holder.hpp"
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include "SendCounterPacket.hpp"
#include "ICounterValues.hpp"
#include "CounterIdMap.hpp"
diff --git a/src/profiling/PeriodicCounterSelectionCommandHandler.hpp b/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
index b59d84cffa..8cf5595920 100644
--- a/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
+++ b/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
@@ -6,7 +6,7 @@
#pragma once
#include "CounterIdMap.hpp"
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include "CommandHandlerFunctor.hpp"
#include "Holder.hpp"
#include "ProfilingStateMachine.hpp"
diff --git a/src/profiling/ProfilingUtils.hpp b/src/profiling/ProfilingUtils.hpp
index e2ffb24bf9..127534a593 100644
--- a/src/profiling/ProfilingUtils.hpp
+++ b/src/profiling/ProfilingUtils.hpp
@@ -10,7 +10,8 @@
#include "ICounterDirectory.hpp"
#include "IPacketBuffer.hpp"
-#include "Packet.hpp"
+
+#include "common/include/Packet.hpp"
#include <boost/numeric/conversion/cast.hpp>
diff --git a/src/profiling/RequestCounterDirectoryCommandHandler.hpp b/src/profiling/RequestCounterDirectoryCommandHandler.hpp
index 9ceca3f643..ea60ca83e4 100644
--- a/src/profiling/RequestCounterDirectoryCommandHandler.hpp
+++ b/src/profiling/RequestCounterDirectoryCommandHandler.hpp
@@ -8,7 +8,7 @@
#include "CommandHandlerFunctor.hpp"
#include "ISendCounterPacket.hpp"
#include "armnn/profiling/ISendTimelinePacket.hpp"
-#include "Packet.hpp"
+#include "common/include/Packet.hpp"
#include "ProfilingStateMachine.hpp"
namespace armnn
diff --git a/src/profiling/test/PrintPacketHeaderHandler.hpp b/src/profiling/test/PrintPacketHeaderHandler.hpp
index 3cd5921e51..6564f3cea5 100644
--- a/src/profiling/test/PrintPacketHeaderHandler.hpp
+++ b/src/profiling/test/PrintPacketHeaderHandler.hpp
@@ -6,7 +6,7 @@
#pragma once
#include <armnn/profiling/ILocalPacketHandler.hpp>
-#include "Packet.hpp"
+#include <Packet.hpp>
namespace armnn
{
diff --git a/src/profiling/test/TestTimelinePacketHandler.hpp b/src/profiling/test/TestTimelinePacketHandler.hpp
index 2902e5f89c..67395254fc 100644
--- a/src/profiling/test/TestTimelinePacketHandler.hpp
+++ b/src/profiling/test/TestTimelinePacketHandler.hpp
@@ -7,7 +7,8 @@
#include <armnn/profiling/ILocalPacketHandler.hpp>
#include <armnn/profiling/ITimelineDecoder.hpp>
-#include "Packet.hpp"
+#include <Packet.hpp>
+
#include "ProfilingUtils.hpp"
#include "TimelineCaptureCommandHandler.hpp"
#include "TimelineDirectoryCaptureCommandHandler.hpp"