aboutsummaryrefslogtreecommitdiff
path: root/applications/message_handler/message_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'applications/message_handler/message_handler.cpp')
-rw-r--r--applications/message_handler/message_handler.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/applications/message_handler/message_handler.cpp b/applications/message_handler/message_handler.cpp
index 585d63c..f6135fc 100644
--- a/applications/message_handler/message_handler.cpp
+++ b/applications/message_handler/message_handler.cpp
@@ -254,6 +254,20 @@ void InferenceHandler::runInference(ethosu_core_inference_req &req, ethosu_core_
job.clean();
/*
+ * Print PMU counters
+ */
+
+ const int numEvents = std::min(static_cast<int>(ETHOSU_PMU_Get_NumEventCounters()), ETHOSU_CORE_PMU_MAX);
+
+ for (int i = 0; i < numEvents; i++) {
+ printf("ethos-u : ethosu_pmu_cntr%d : %" PRIu32 "\n", i, rsp.pmu_event_count[i]);
+ }
+
+ if (rsp.pmu_cycle_counter_enable) {
+ printf("ethos-u : cycle_cnt : %" PRIu64 " cycles\n", rsp.pmu_cycle_counter_count);
+ }
+
+ /*
* Send inference response
*/