diff mbox series

[v12,05/15] accel/tcg: move profiler dev_time to tb_stats

Message ID 20230518135757.1442654-6-fei2.wu@intel.com
State New
Headers show
Series None | expand

Commit Message

Fei Wu May 18, 2023, 1:57 p.m. UTC
From: Alex Bennée <alex.bennee@linaro.org>

This shouldn't live in the monitor code anyway. While we are at it
make it an uint64_t as we won't be dealing in negative numbers.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Fei Wu <fei2.wu@intel.com>
---
 accel/tcg/monitor.c  | 2 --
 accel/tcg/tb-stats.c | 2 ++
 include/qemu/timer.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c
index 92fce580f1..d4e044f7f5 100644
--- a/accel/tcg/monitor.c
+++ b/accel/tcg/monitor.c
@@ -82,8 +82,6 @@  HumanReadableText *qmp_x_query_opcount(Error **errp)
 
 #ifdef CONFIG_PROFILER
 
-int64_t dev_time;
-
 HumanReadableText *qmp_x_query_profile(Error **errp)
 {
     g_autoptr(GString) buf = g_string_new("");
diff --git a/accel/tcg/tb-stats.c b/accel/tcg/tb-stats.c
index 74708d1f40..7deb617446 100644
--- a/accel/tcg/tb-stats.c
+++ b/accel/tcg/tb-stats.c
@@ -28,6 +28,8 @@  enum TBStatsStatus {
 static enum TBStatsStatus tcg_collect_tb_stats;
 static uint32_t default_tbstats_flag;
 
+uint64_t dev_time;
+
 struct jit_profile_info {
     uint64_t translations;
     uint64_t aborted;
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index ee071e07d1..d86fc73a17 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -995,7 +995,7 @@  static inline int64_t profile_getclock(void)
     return get_clock();
 }
 
-extern int64_t dev_time;
+extern uint64_t dev_time;
 #endif
 
 #endif