aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ethosu_monitor/include/ethosu_monitor.hpp5
-rw-r--r--lib/ethosu_monitor/src/ethosu_monitor.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/ethosu_monitor/include/ethosu_monitor.hpp b/lib/ethosu_monitor/include/ethosu_monitor.hpp
index c1308a5..fa5a63f 100644
--- a/lib/ethosu_monitor/include/ethosu_monitor.hpp
+++ b/lib/ethosu_monitor/include/ethosu_monitor.hpp
@@ -25,13 +25,14 @@
#include <ethosu_driver.h>
#include <pmu_ethosu.h>
#include <stdint.h>
+#include <vector>
class EthosUMonitor {
public:
enum Backend { PRINTF, EVENT_RECORDER };
- EthosUMonitor(int32_t __id = EventID(EventLevelError, EvtStatistics_No, EventRecordNone), Backend backend = PRINTF);
+ EthosUMonitor(std::vector<int32_t> eventRecordIds, Backend backend = PRINTF);
template <typename T>
void configure(ethosu_driver *drv, const T &eventIds) {
@@ -59,8 +60,8 @@ public:
private:
ethosu_pmu_event_type ethosuEventIds[ETHOSU_PMU_NCOUNTERS];
size_t numEvents;
- int32_t eventRecordId;
Backend backend;
+ std::vector<int32_t> eventRecordIds;
};
#endif
diff --git a/lib/ethosu_monitor/src/ethosu_monitor.cpp b/lib/ethosu_monitor/src/ethosu_monitor.cpp
index 70a8656..d5cfce9 100644
--- a/lib/ethosu_monitor/src/ethosu_monitor.cpp
+++ b/lib/ethosu_monitor/src/ethosu_monitor.cpp
@@ -19,8 +19,8 @@
#include "ethosu_monitor.hpp"
#include <stdio.h>
-EthosUMonitor::EthosUMonitor(int32_t __eventRecordId, Backend __backend) :
- eventRecordId(__eventRecordId), backend(__backend) {}
+EthosUMonitor::EthosUMonitor(std::vector<int32_t> __eventRecordIds, Backend __backend) :
+ eventRecordIds(__eventRecordIds), backend(__backend) {}
void EthosUMonitor::monitorSample(ethosu_driver *drv) {
// Fetch events
@@ -29,7 +29,7 @@ void EthosUMonitor::monitorSample(ethosu_driver *drv) {
eventCount[i] = ETHOSU_PMU_Get_EVCNTR(drv, i);
switch (backend) {
case EVENT_RECORDER:
- EventRecord2(eventRecordId, ethosuEventIds[i], eventCount[i]);
+ EventRecord2(eventRecordIds[i], ethosuEventIds[i], eventCount[i]);
break;
case PRINTF:
default: