replay.c (60618e2d77691e44bb78e23b2b0cf07b5c405e56) | replay.c (3e21408b0596aa2babe1e26996a15e7ad5eee71a) |
---|---|
1/* 2 * replay.c 3 * 4 * Copyright (c) 2010-2015 Institute for System Programming 5 * of the Russian Academy of Sciences. 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2 or later. 8 * See the COPYING file in the top-level directory. --- 8 unchanged lines hidden (view full) --- 17#include "replay-internal.h" 18#include "qemu/main-loop.h" 19#include "qemu/option.h" 20#include "sysemu/cpus.h" 21#include "qemu/error-report.h" 22 23/* Current version of the replay mechanism. 24 Increase it when file format changes. */ | 1/* 2 * replay.c 3 * 4 * Copyright (c) 2010-2015 Institute for System Programming 5 * of the Russian Academy of Sciences. 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2 or later. 8 * See the COPYING file in the top-level directory. --- 8 unchanged lines hidden (view full) --- 17#include "replay-internal.h" 18#include "qemu/main-loop.h" 19#include "qemu/option.h" 20#include "sysemu/cpus.h" 21#include "qemu/error-report.h" 22 23/* Current version of the replay mechanism. 24 Increase it when file format changes. */ |
25#define REPLAY_VERSION 0xe0200b | 25#define REPLAY_VERSION 0xe0200c |
26/* Size of replay log header */ 27#define HEADER_SIZE (sizeof(uint32_t) + sizeof(uint64_t)) 28 29ReplayMode replay_mode = REPLAY_MODE_NONE; 30char *replay_snapshot; 31 32/* Name of replay file */ 33static char *replay_filename; --- 182 unchanged lines hidden (view full) --- 216bool replay_has_event(void) 217{ 218 bool res = false; 219 if (replay_mode == REPLAY_MODE_PLAY) { 220 g_assert(replay_mutex_locked()); 221 replay_account_executed_instructions(); 222 res = EVENT_CHECKPOINT <= replay_state.data_kind 223 && replay_state.data_kind <= EVENT_CHECKPOINT_LAST; | 26/* Size of replay log header */ 27#define HEADER_SIZE (sizeof(uint32_t) + sizeof(uint64_t)) 28 29ReplayMode replay_mode = REPLAY_MODE_NONE; 30char *replay_snapshot; 31 32/* Name of replay file */ 33static char *replay_filename; --- 182 unchanged lines hidden (view full) --- 216bool replay_has_event(void) 217{ 218 bool res = false; 219 if (replay_mode == REPLAY_MODE_PLAY) { 220 g_assert(replay_mutex_locked()); 221 replay_account_executed_instructions(); 222 res = EVENT_CHECKPOINT <= replay_state.data_kind 223 && replay_state.data_kind <= EVENT_CHECKPOINT_LAST; |
224 res = res || replay_state.data_kind == EVENT_ASYNC; | 224 res = res || (EVENT_ASYNC <= replay_state.data_kind 225 && replay_state.data_kind <= EVENT_ASYNC_LAST); |
225 } 226 return res; 227} 228 229static void replay_enable(const char *fname, int mode) 230{ 231 const char *fmode = NULL; 232 assert(!replay_file); --- 156 unchanged lines hidden --- | 226 } 227 return res; 228} 229 230static void replay_enable(const char *fname, int mode) 231{ 232 const char *fmode = NULL; 233 assert(!replay_file); --- 156 unchanged lines hidden --- |