aboutsummaryrefslogtreecommitdiff
path: root/replay/replay-internal.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-08-21 09:00:49 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-08-21 09:00:49 +0100
commitf2cfa1229e539ee1bb1822912075cf25538ad6b9 (patch)
treeb0d325ec6f68410fd19615af2c47becdb365af07 /replay/replay-internal.c
parent17dc57990320edaad52ac9ea808be9719c91cea6 (diff)
parent80db491da4ce8b199e0e8d1e23943b20aab82f69 (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* New KVM PV features (Marcelo, Wanpeng) * valgrind fixes (Andrey) * Remove clock reset notifiers (David) * KConfig and Makefile cleanups (Paolo) * Replay and icount improvements (Pavel) * x86 FP fixes (Peter M.) * TCG locking assertions (Roman) * x86 support for mmap-ed -kernel/-initrd (Stefano) * Other cleanups (Wei Yang, Yan Zhao, Tony) * LSI fix for infinite loop (Prasad) * ARM migration fix (Catherine) * AVX512_BF16 feature (Jing) # gpg: Signature made Tue 20 Aug 2019 19:00:54 BST # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (33 commits) x86: Intel AVX512_BF16 feature enabling scsi: lsi: exit infinite loop while executing script (CVE-2019-12068) test-bitmap: test set 1 bit case for bitmap_set migration: do not rom_reset() during incoming migration HACKING: Document 'struct' keyword usage kvm: vmxcap: Enhance with latest features cpus-common: nuke finish_safe_work icount: remove unnecessary gen_io_end calls icount: clean up cpu_can_io at the entry to the block replay: rename step-related variables and functions replay: refine replay-time module replay: fix replay shutdown util/qemu-timer: refactor deadline calculation for external timers replay: document development rules replay: add missing fix for internal function timer: last, remove last bits of last replay: Remove host_clock_last timer: Remove reset notifiers mc146818rtc: Remove reset notifiers memory: fix race between TCG and accesses to dirty bitmap ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'replay/replay-internal.c')
-rw-r--r--replay/replay-internal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/replay/replay-internal.c b/replay/replay-internal.c
index c013b23820..eba8246aae 100644
--- a/replay/replay-internal.c
+++ b/replay/replay-internal.c
@@ -173,7 +173,7 @@ void replay_fetch_data_kind(void)
if (!replay_state.has_unread_data) {
replay_state.data_kind = replay_get_byte();
if (replay_state.data_kind == EVENT_INSTRUCTION) {
- replay_state.instructions_count = replay_get_dword();
+ replay_state.instruction_count = replay_get_dword();
}
replay_check_error();
replay_state.has_unread_data = 1;
@@ -227,9 +227,9 @@ void replay_mutex_unlock(void)
}
}
-void replay_advance_current_step(uint64_t current_step)
+void replay_advance_current_icount(uint64_t current_icount)
{
- int diff = (int)(replay_get_current_step() - replay_state.current_step);
+ int diff = (int)(current_icount - replay_state.current_icount);
/* Time can only go forward */
assert(diff >= 0);
@@ -237,7 +237,7 @@ void replay_advance_current_step(uint64_t current_step)
if (diff > 0) {
replay_put_event(EVENT_INSTRUCTION);
replay_put_dword(diff);
- replay_state.current_step += diff;
+ replay_state.current_icount += diff;
}
}
@@ -246,6 +246,6 @@ void replay_save_instructions(void)
{
if (replay_file && replay_mode == REPLAY_MODE_RECORD) {
g_assert(replay_mutex_locked());
- replay_advance_current_step(replay_get_current_step());
+ replay_advance_current_icount(replay_get_current_icount());
}
}