mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 22:33:36 +08:00
timer: remove replay clock probe in deadline calculation
Ciro Santilli reported that commit a5ed352596
breaks the execution replay. It happens due to the probing the clock
for the new instances of iothread.
However, this probing was made in replay mode for the timer lists that
are empty.
This patch removes clock probing in replay mode.
It is an artifact of the old version with another thread model.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Message-Id: <20180725121526.12867.17866.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1d3db6bdbb
commit
e4dab9449a
@ -578,17 +578,10 @@ int64_t timerlistgroup_deadline_ns(QEMUTimerListGroup *tlg)
|
|||||||
{
|
{
|
||||||
int64_t deadline = -1;
|
int64_t deadline = -1;
|
||||||
QEMUClockType type;
|
QEMUClockType type;
|
||||||
bool play = replay_mode == REPLAY_MODE_PLAY;
|
|
||||||
for (type = 0; type < QEMU_CLOCK_MAX; type++) {
|
for (type = 0; type < QEMU_CLOCK_MAX; type++) {
|
||||||
if (qemu_clock_use_for_deadline(type)) {
|
if (qemu_clock_use_for_deadline(type)) {
|
||||||
if (!play || type == QEMU_CLOCK_REALTIME) {
|
deadline = qemu_soonest_timeout(deadline,
|
||||||
deadline = qemu_soonest_timeout(deadline,
|
timerlist_deadline_ns(tlg->tl[type]));
|
||||||
timerlist_deadline_ns(tlg->tl[type]));
|
|
||||||
} else {
|
|
||||||
/* Read clock from the replay file and
|
|
||||||
do not calculate the deadline, based on virtual clock. */
|
|
||||||
qemu_clock_get_ns(type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return deadline;
|
return deadline;
|
||||||
|
Loading…
Reference in New Issue
Block a user