From 89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Mon, 16 Mar 2015 14:57:38 +1100 Subject: 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 Message-Id: <1426478258-29961-1-git-send-email-aik@ozlabs.ru> Signed-off-by: Paolo Bonzini --- cpus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpus.c') diff --git a/cpus.c b/cpus.c index 1ce90a12e8..314df16190 100644 --- a/cpus.c +++ b/cpus.c @@ -1353,7 +1353,7 @@ static int tcg_cpu_exec(CPUArchState *env) } ret = cpu_exec(env); #ifdef CONFIG_PROFILER - qemu_time += profile_getclock() - ti; + tcg_time += profile_getclock() - ti; #endif if (use_icount) { /* Fold pending instructions back into the -- cgit v1.2.3-55-g7522