aboutsummaryrefslogtreecommitdiff
path: root/replay
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2018-02-27 12:52:09 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-12 16:12:50 +0100
commit1652e0c30f28b755fde72d363634a586f133dc20 (patch)
tree19d166a73e4b21b874149af82cc69ef9cad3119e /replay
parent1a96e3c1e7dbb466a8c93743b8f5ae37cc023766 (diff)
replay: fixed replay_enable_events
This patch fixes assignment to internal events_enabled variable. Now it is set only in record/replay mode. This affects the behavior of the external functions that check this flag. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095209.1060.45884.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Diffstat (limited to 'replay')
-rw-r--r--replay/replay-events.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/replay/replay-events.c b/replay/replay-events.c
index 768b505f3d..e858254074 100644
--- a/replay/replay-events.c
+++ b/replay/replay-events.c
@@ -67,7 +67,9 @@ static void replay_run_event(Event *event)
void replay_enable_events(void)
{
- events_enabled = true;
+ if (replay_mode != REPLAY_MODE_NONE) {
+ events_enabled = true;
+ }
}
bool replay_has_events(void)
@@ -141,7 +143,7 @@ void replay_add_event(ReplayAsyncEventKind event_kind,
void replay_bh_schedule_event(QEMUBH *bh)
{
- if (replay_mode != REPLAY_MODE_NONE && events_enabled) {
+ if (events_enabled) {
uint64_t id = replay_get_current_step();
replay_add_event(REPLAY_ASYNC_EVENT_BH, bh, NULL, id);
} else {
@@ -161,7 +163,7 @@ void replay_add_input_sync_event(void)
void replay_block_event(QEMUBH *bh, uint64_t id)
{
- if (replay_mode != REPLAY_MODE_NONE && events_enabled) {
+ if (events_enabled) {
replay_add_event(REPLAY_ASYNC_EVENT_BLOCK, bh, NULL, id);
} else {
qemu_bh_schedule(bh);