aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2015-03-16 14:57:38 +1100
committerPaolo Bonzini <pbonzini@redhat.com>2015-03-18 12:07:34 +0100
commit89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2 (patch)
tree2ea1099fb677e42f1be781434cb3ef371a89061e /include
parentb680c5ba54946ab205cdb5083bc0a17e3f2fb468 (diff)
downloadqemu-89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2.zip
qemu-89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2.tar.gz
qemu-89d5cbddeeaf6bb4aa6a5ca4fbb443115abce4a2.tar.bz2
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 'include')
-rw-r--r--include/qemu/timer.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index eba8b21..e5bd494 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -999,11 +999,10 @@ static inline int64_t cpu_get_real_ticks (void)
#ifdef CONFIG_PROFILER
static inline int64_t profile_getclock(void)
{
- return cpu_get_real_ticks();
+ return get_clock();
}
-extern int64_t qemu_time, qemu_time_start;
-extern int64_t tlb_flush_time;
+extern int64_t tcg_time;
extern int64_t dev_time;
#endif