aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
diff options
context:
space:
mode:
authorFinnWilliamsArm <Finn.Williams@arm.com>2019-09-16 15:45:42 +0100
committerJim Flynn Arm <jim.flynn@arm.com>2019-09-25 05:28:48 +0000
commitf6e534a82d167403c5980e3ea3b67135ff9be78b (patch)
tree1d355ea0c6e9d2c42836c0a378f4cc10978abf6c /src/profiling/ProfilingService.hpp
parent95e73d77b9a79f7d350a39d85f07d09cd58422cc (diff)
downloadarmnn-f6e534a82d167403c5980e3ea3b67135ff9be78b.tar.gz
IVGCVSW-3411 Add the Counter Values array and accessor methods
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com> Change-Id: I4fa2428a83b93cbe58b821344206e2f7ce9e37e7
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r--src/profiling/ProfilingService.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index eb29c33fba..6d617978e5 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -8,6 +8,7 @@
#include "ProfilingStateMachine.hpp"
#include "ProfilingConnectionFactory.hpp"
#include "CounterDirectory.hpp"
+#include "CounterValues.hpp"
namespace armnn
{
@@ -15,7 +16,7 @@ namespace armnn
namespace profiling
{
-class ProfilingService
+class ProfilingService : IWriteCounterValues
{
public:
ProfilingService(const Runtime::CreationOptions::ExternalProfilingOptions& options);
@@ -27,13 +28,24 @@ public:
ProfilingState GetCurrentState() const;
void ResetExternalProfilingOptions(const Runtime::CreationOptions::ExternalProfilingOptions& options);
+ uint16_t GetCounterCount() const;
+ void GetCounterValue(uint16_t index, uint32_t& value) const;
+ void SetCounterValue(uint16_t index, uint32_t value);
+ void AddCounterValue(uint16_t index, uint32_t value);
+ void SubtractCounterValue(uint16_t index, uint32_t value);
+ void IncrementCounterValue(uint16_t index);
+ void DecrementCounterValue(uint16_t index);
+
private:
void Initialise();
+ void CheckIndexSize(uint16_t counterIndex) const;
CounterDirectory m_CounterDirectory;
ProfilingConnectionFactory m_Factory;
Runtime::CreationOptions::ExternalProfilingOptions m_Options;
ProfilingStateMachine m_State;
+
+ std::unordered_map<uint16_t, std::atomic<uint32_t>> m_CounterIdToValue;
};
} // namespace profiling