mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
replay: save/load initial state
This patch implements initial vmstate creation or loading at the start of record/replay. It is needed for rewinding the execution in the replay mode. v4 changes: - snapshots are not created by default anymore v3 changes: - added rrsnapshot option Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20170124071746.4572.61449.stgit@PASHA-ISP> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
ac8c19ba74
commit
9c2037d0a4
@ -26,6 +26,7 @@
|
||||
#define HEADER_SIZE (sizeof(uint32_t) + sizeof(uint64_t))
|
||||
|
||||
ReplayMode replay_mode = REPLAY_MODE_NONE;
|
||||
char *replay_snapshot;
|
||||
|
||||
/* Name of replay file */
|
||||
static char *replay_filename;
|
||||
@ -292,6 +293,7 @@ void replay_configure(QemuOpts *opts)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
replay_snapshot = g_strdup(qemu_opt_get(opts, "rrsnapshot"));
|
||||
replay_vmstate_register();
|
||||
replay_enable(fname, mode);
|
||||
|
||||
@ -346,6 +348,9 @@ void replay_finish(void)
|
||||
replay_filename = NULL;
|
||||
}
|
||||
|
||||
g_free(replay_snapshot);
|
||||
replay_snapshot = NULL;
|
||||
|
||||
replay_finish_events();
|
||||
replay_mutex_destroy();
|
||||
}
|
||||
|
Reference in New Issue
Block a user