From efab87cf79077a9624f675fc5fc8f034eaedfe4d Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Thu, 17 Sep 2015 19:24:39 +0300 Subject: icount: improve counting for record/replay icount_warp_rt function is called by qemu_clock_warp and as callback of icount_warp timer. This patch adds call to qemu_clock_warp into main_loop_wait function, because icount warp may be missed in record/replay mode, when CPU is sleeping. This patch also disables of calling this function by timer, because it is not needed after making modifications of main_loop_wait. Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162439.8676.38290.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- main-loop.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main-loop.c') diff --git a/main-loop.c b/main-loop.c index db600a3..df28670 100644 --- a/main-loop.c +++ b/main-loop.c @@ -506,6 +506,9 @@ int main_loop_wait(int nonblocking) slirp_pollfds_poll(gpollfds, (ret < 0)); #endif + /* CPU thread can infinitely wait for event after + missing the warp */ + qemu_clock_warp(QEMU_CLOCK_VIRTUAL); qemu_clock_run_all_timers(); return ret; -- cgit v1.1