aboutsummaryrefslogtreecommitdiff
path: root/lib/ethosu_monitor
diff options
context:
space:
mode:
authorAnton Moberg <anton.moberg@arm.com>2021-07-07 11:08:17 +0200
committerFredrik Knutsson <fredrik.knutsson@arm.com>2021-07-15 09:46:02 +0000
commit07cf70b46cd2bf7db94a8d0e0d845eb44be24d1c (patch)
tree8c54c8d1785d58d2c336f695bd986350af3c0960 /lib/ethosu_monitor
parent67536759dce9d6a41d42c6403edc4482623eea0b (diff)
downloadethos-u-core-software-07cf70b46cd2bf7db94a8d0e0d845eb44be24d1c.tar.gz
Improved Logging - Core Software
Logging macros: Added ethosu_logging.h as a lib, containing logging macros controlled by a parameter ETHOSU_LOG_SEVERITY set in core_software CMakeLists.txt Updated inference_process: Updated inference_process to include ethosu_logging and use the logging macros rather than printf() Updated message_process: Updated message_process to include ethosu_logging and use the logging macros rather than printf() Updated ethosu_monitor: Updated ethosu_monitor to include ethosu_logging and use the logging macros rather than printf() Updated layer_by_layer_profiler: Updated layer_by_layer_profiler to include ethosu_logging and use the logging macros rather than printf() Updated mhu_v2: Updated mhu_v2 to include ethosu_logging and use the logging macros rather than printf() Change-Id: I5d6fd80b7645b3e0af5b494eea6dbb7755f02122
Diffstat (limited to 'lib/ethosu_monitor')
-rw-r--r--lib/ethosu_monitor/CMakeLists.txt2
-rw-r--r--lib/ethosu_monitor/src/ethosu_monitor.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/ethosu_monitor/CMakeLists.txt b/lib/ethosu_monitor/CMakeLists.txt
index 50f6526..7983c48 100644
--- a/lib/ethosu_monitor/CMakeLists.txt
+++ b/lib/ethosu_monitor/CMakeLists.txt
@@ -21,6 +21,6 @@ if (NOT TARGET ethosu_core_driver)
endif()
add_library(ethosu_monitor INTERFACE)
-target_link_libraries(ethosu_monitor INTERFACE ethosu_core_driver event_recorder)
+target_link_libraries(ethosu_monitor INTERFACE ethosu_core_driver event_recorder ethosu_log)
target_include_directories(ethosu_monitor INTERFACE include)
target_sources(ethosu_monitor INTERFACE src/ethosu_monitor.cpp)
diff --git a/lib/ethosu_monitor/src/ethosu_monitor.cpp b/lib/ethosu_monitor/src/ethosu_monitor.cpp
index d5cfce9..651fc28 100644
--- a/lib/ethosu_monitor/src/ethosu_monitor.cpp
+++ b/lib/ethosu_monitor/src/ethosu_monitor.cpp
@@ -17,6 +17,7 @@
*/
#include "ethosu_monitor.hpp"
+#include "ethosu_log.h"
#include <stdio.h>
EthosUMonitor::EthosUMonitor(std::vector<int32_t> __eventRecordIds, Backend __backend) :
@@ -33,7 +34,7 @@ void EthosUMonitor::monitorSample(ethosu_driver *drv) {
break;
case PRINTF:
default:
- printf("ethosu_pmu_cntr%d : %u\n", i, eventCount[i]);
+ LOG("ethosu_pmu_cntr%d : %u\n", i, eventCount[i]);
}
}
}