aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applications/inference_process/src/inference_process.cpp2
-rw-r--r--lib/arm_profiler/include/arm_profiler.hpp4
-rw-r--r--lib/arm_profiler/src/arm_profiler.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/applications/inference_process/src/inference_process.cpp b/applications/inference_process/src/inference_process.cpp
index c877d45..9438882 100644
--- a/applications/inference_process/src/inference_process.cpp
+++ b/applications/inference_process/src/inference_process.cpp
@@ -157,7 +157,7 @@ bool InferenceProcess::runJob(InferenceJob &job) {
return true;
}
- LOG("Inference runtime: %" PRId32 " cycles\n", profiler.GetTotalTicks());
+ LOG("Inference runtime: %" PRIu64 " cycles\n", profiler.GetTotalTicks());
// Copy output data from TFLu arena to job descriptor
if (copyOfm(job, interpreter)) {
diff --git a/lib/arm_profiler/include/arm_profiler.hpp b/lib/arm_profiler/include/arm_profiler.hpp
index 36adb8d..0b97e2e 100644
--- a/lib/arm_profiler/include/arm_profiler.hpp
+++ b/lib/arm_profiler/include/arm_profiler.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2022 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -30,7 +30,7 @@ public:
ArmProfiler(size_t max_events = 200);
uint32_t BeginEvent(const char *tag);
void EndEvent(uint32_t event_handle);
- int32_t GetTotalTicks() const;
+ uint64_t GetTotalTicks() const;
private:
size_t max_events_;
diff --git a/lib/arm_profiler/src/arm_profiler.cpp b/lib/arm_profiler/src/arm_profiler.cpp
index 95bc3e4..c90eec2 100644
--- a/lib/arm_profiler/src/arm_profiler.cpp
+++ b/lib/arm_profiler/src/arm_profiler.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2022 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -54,8 +54,8 @@ void ArmProfiler::EndEvent(uint32_t event_handle) {
"%s : cycle_cnt : %u cycles", tags_[event_handle], end_ticks_[event_handle] - start_ticks_[event_handle]);
}
-int32_t ArmProfiler::GetTotalTicks() const {
- int32_t ticks = 0;
+uint64_t ArmProfiler::GetTotalTicks() const {
+ uint64_t ticks = 0;
for (size_t i = 0; i < num_events_; ++i) {
ticks += end_ticks_[i] - start_ticks_[i];