summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy2015-03-16 04:57:38 +0100
committerPaolo Bonzini2015-03-18 12:07:34 +0100
commit89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2 (patch)
tree2ea1099fb677e42f1be781434cb3ef371a89061e /monitor.c
parentkvm: fix ioeventfd endianness on bi-endian architectures (diff)
downloadqemu-89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2.tar.gz
qemu-89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2.tar.xz
qemu-89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2.zip
profiler: Reenable built-in profiler
2ed1ebcf6 "timer: replace time() with QEMU_CLOCK_HOST" broke compile when configured with --enable-profiler. Turned out the profiler has been broken for a while. This does s/qemu_time/tcg_time/ as the profiler only works in a TCG mode. This also fixes the compile error. This changes profile_getclock() to return nanoseconds rather than CPU ticks as the "profile" HMP command prints seconds and there is no platform-independent way to get ticks-per-second rate. Since TCG is quite slow and get_clock() returns nanoseconds (fine enough), this should not affect precision much. This removes unused qemu_time_start and tlb_flush_time. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Message-Id: <1426478258-29961-1-git-send-email-aik@ozlabs.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 42116a942e..65a63dfbbf 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1975,7 +1975,7 @@ static void hmp_info_numa(Monitor *mon, const QDict *qdict)
#ifdef CONFIG_PROFILER
-int64_t qemu_time;
+int64_t tcg_time;
int64_t dev_time;
static void hmp_info_profile(Monitor *mon, const QDict *qdict)
@@ -1983,8 +1983,8 @@ static void hmp_info_profile(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "async time %" PRId64 " (%0.3f)\n",
dev_time, dev_time / (double)get_ticks_per_sec());
monitor_printf(mon, "qemu time %" PRId64 " (%0.3f)\n",
- qemu_time, qemu_time / (double)get_ticks_per_sec());
- qemu_time = 0;
+ tcg_time, tcg_time / (double)get_ticks_per_sec());
+ tcg_time = 0;
dev_time = 0;
}
#else