summaryrefslogtreecommitdiffstats
path: root/include/exec/exec-all.h
diff options
context:
space:
mode:
authorClaudio Fontana2020-08-19 13:17:19 +0200
committerPaolo Bonzini2020-10-05 16:41:22 +0200
commit740b175973427bcfa32ad894bb1f83b96d184c28 (patch)
tree3613e83be5fd8620b369479b98e6ede5d5746a9a /include/exec/exec-all.h
parentMerge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ... (diff)
downloadqemu-740b175973427bcfa32ad894bb1f83b96d184c28.tar.gz
qemu-740b175973427bcfa32ad894bb1f83b96d184c28.tar.xz
qemu-740b175973427bcfa32ad894bb1f83b96d184c28.zip
cpu-timers, icount: new modules
refactoring of cpus.c continues with cpu timer state extraction. cpu-timers: responsible for the softmmu cpu timers state, including cpu clocks and ticks. icount: counts the TCG instructions executed. As such it is specific to the TCG accelerator. Therefore, it is built only under CONFIG_TCG. One complication is due to qtest, which uses an icount field to warp time as part of qtest (qtest_clock_warp). In order to solve this problem, provide a separate counter for qtest. This requires fixing assumptions scattered in the code that qtest_enabled() implies icount_enabled(), checking each specific case. Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [remove redundant initialization with qemu_spice_init] Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [fix lingering calls to icount_get] Signed-off-by: Claudio Fontana <cfontana@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/exec-all.h')
-rw-r--r--include/exec/exec-all.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 1fe28d574f..66f9b4cca6 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -25,7 +25,7 @@
#ifdef CONFIG_TCG
#include "exec/cpu_ldst.h"
#endif
-#include "sysemu/cpus.h"
+#include "sysemu/cpu-timers.h"
/* allow to see translation results - the slowdown should be negligible, so we leave it */
#define DEBUG_DISAS
@@ -497,7 +497,7 @@ static inline uint32_t tb_cflags(const TranslationBlock *tb)
static inline uint32_t curr_cflags(void)
{
return (parallel_cpus ? CF_PARALLEL : 0)
- | (use_icount ? CF_USE_ICOUNT : 0);
+ | (icount_enabled() ? CF_USE_ICOUNT : 0);
}
/* TranslationBlock invalidate API */