aboutsummaryrefslogtreecommitdiff
path: root/replay/replay.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2018-10-18 09:33:45 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-19 13:44:12 +0200
commitca9759c2a92f528f256fef0e3922416f7bb47bf9 (patch)
tree8e1152eced839d5938854daef47eddd3c6445c6b /replay/replay.c
parenta8de0115008184788525a0fab5cb74368be808a4 (diff)
replay: don't process events at virtual clock checkpoint
As QEMU becomes more multi-threaded and non-synchronized, checkpoints move from thread to thread. And the event queue that processed at checkpoints should belong to the same thread in both record and replay executions. This patch disables asynchronous event processing at virtual clock checkpoint, because it may be invoked in different threads at record and replay. This patch is temporary fix until the checkpoints are completely refactored. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Message-Id: <20181018063345.7433.11678.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'replay/replay.c')
-rw-r--r--replay/replay.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/replay/replay.c b/replay/replay.c
index 379b51ab46..8b172b2d1b 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -214,7 +214,14 @@ bool replay_checkpoint(ReplayCheckpoint checkpoint)
/* This checkpoint belongs to several threads.
Processing events from different threads is
non-deterministic */
- if (checkpoint != CHECKPOINT_CLOCK_WARP_START) {
+ if (checkpoint != CHECKPOINT_CLOCK_WARP_START
+ /* FIXME: this is temporary fix, other checkpoints
+ may also be invoked from the different threads someday.
+ Asynchronous event processing should be refactored
+ to create additional replay event kind which is
+ nailed to the one of the threads and which processes
+ the event queue. */
+ && checkpoint != CHECKPOINT_CLOCK_VIRTUAL) {
replay_save_events(checkpoint);
}
res = true;