diff options
author | Sebastian Tanase <sebastian.tanase@openwide.fr> | 2014-07-25 11:56:33 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-07 15:09:48 +0200 |
commit | 27498bef357de432a9aa403c5ccf11776773ba58 (patch) | |
tree | c947695994b52bba46d00bac299bc6e2028b35fd /cpu-exec.c | |
parent | 7f7bc144ed653c6026ec956045224666abdec316 (diff) |
monitor: Add drift info to 'info jit'
Show in 'info jit' the current delay between the host clock
and the guest clock. In addition, print the maximum advance
and delay of the guest compared to the host.
Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr>
Tested-by: Camille Bégué <camille.begue@openwide.fr>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index 3c14502329..cbc8067b37 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -105,6 +105,12 @@ static void init_delay_params(SyncClocks *sc, sc->realtime_clock + cpu_get_clock_offset(); sc->last_cpu_icount = cpu->icount_extra + cpu->icount_decr.u16.low; + if (sc->diff_clk < max_delay) { + max_delay = sc->diff_clk; + } + if (sc->diff_clk > max_advance) { + max_advance = sc->diff_clk; + } /* Print every 2s max if the guest is late. We limit the number of printed messages to NB_PRINT_MAX(currently 100) */ |