[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v5 23/31] cpus: make icount warp deterministic i
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-devel] [RFC PATCH v5 23/31] cpus: make icount warp deterministic in replay mode |
Date: |
Wed, 26 Nov 2014 13:40:55 +0300 |
User-agent: |
StGit/0.16 |
This patch adds saving and replaying warping parameters in record and replay
modes. These parameters affect on virtual clock values and therefore should
be deterministic.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
cpus.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/cpus.c b/cpus.c
index 707bf34..f6a6319 100644
--- a/cpus.c
+++ b/cpus.c
@@ -370,7 +370,7 @@ static void icount_warp_rt(void *opaque)
seqlock_write_lock(&timers_state.vm_clock_seqlock);
if (runstate_is_running()) {
- int64_t clock = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
+ int64_t clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL_RT);
int64_t warp_delta;
warp_delta = clock - vm_clock_warp_start;
@@ -444,7 +444,7 @@ void qemu_clock_warp(QEMUClockType type)
}
/* We want to use the earliest deadline from ALL vm_clocks */
- clock = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
+ clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL_RT);
deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);
if (deadline < 0) {
return;
@@ -537,8 +537,8 @@ void configure_icount(QemuOpts *opts, Error **errp)
return;
}
icount_align_option = qemu_opt_get_bool(opts, "align", false);
- icount_warp_timer = timer_new_ns(QEMU_CLOCK_REALTIME,
- icount_warp_rt, NULL);
+ icount_warp_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL_RT,
+ icount_warp_rt, NULL);
if (strcmp(option, "auto") != 0) {
errno = 0;
icount_time_shift = strtol(option, &rem_str, 0);
@@ -562,10 +562,10 @@ void configure_icount(QemuOpts *opts, Error **errp)
the virtual time trigger catches emulated time passing too fast.
Realtime triggers occur even when idle, so use them less frequently
than VM triggers. */
- icount_rt_timer = timer_new_ms(QEMU_CLOCK_REALTIME,
- icount_adjust_rt, NULL);
+ icount_rt_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL_RT,
+ icount_adjust_rt, NULL);
timer_mod(icount_rt_timer,
- qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 1000);
+ qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);
icount_vm_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
icount_adjust_vm, NULL);
timer_mod(icount_vm_timer,
- Re: [Qemu-devel] [RFC PATCH v5 20/31] replay: recording and replaying clock ticks, (continued)
[Qemu-devel] [RFC PATCH v5 23/31] cpus: make icount warp deterministic in replay mode,
Pavel Dovgalyuk <=
[Qemu-devel] [RFC PATCH v5 24/31] replay: shutdown event, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 25/31] replay: checkpoints, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 26/31] replay: bottom halves, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 27/31] replay: replay aio requests, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 28/31] replay: thread pool, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 29/31] replay: initialization and deinitialization, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 30/31] replay: command line options, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 31/31] replay: recording of the user input, Pavel Dovgalyuk, 2014/11/26
Re: [Qemu-devel] [RFC PATCH v5 00/31] Deterministic replay and reverse execution, Pavel Dovgaluk, 2014/11/26