summary refs log tree commit diff stats
path: root/include/hw/ide/internal.h
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2020-06-10 16:55:05 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-06-16 14:49:05 +0100
commitc81950a2f1923dec3f6b952ec6bb9b921be58a70 (patch)
treef3089be1434731727ee068d685b8a499e7f4d4cb /include/hw/ide/internal.h
parentd16242e524a47d2c3e0281951c6d27979992ac3c (diff)
downloadfocaccia-qemu-c81950a2f1923dec3f6b952ec6bb9b921be58a70.tar.gz
focaccia-qemu-c81950a2f1923dec3f6b952ec6bb9b921be58a70.zip
plugins: new lockstep plugin for debugging TCG changes
When we make changes to the TCG we sometimes cause regressions that
are deep into the execution cycle of the guest. Debugging this often
requires comparing large volumes of trace information to figure out
where behaviour has diverged.

The lockstep plugin utilises a shared socket so two QEMU's running
with the plugin will write their current execution position and wait
to receive the position of their partner process. When execution
diverges the plugins output where they were and the previous few
blocks before unloading themselves and letting execution continue.

Originally I planned for this to be most useful with -icount but it
turns out you can get divergence pretty quickly due to asynchronous
qemu_cpu_kick_rr_cpus() events causing one side to eventually run into
a short block a few cycles before the other side. For this reason I've
added a bit of tracking and I think the divergence reporting could be
finessed to report only if we really start to diverge in execution.

An example run would be:

  qemu-system-sparc -monitor none -parallel none -net none \
    -M SS-20 -m 256 -kernel day11/zImage.elf \
    -plugin ./tests/plugin/liblockstep.so,arg=lockstep-sparc.sock \
    -d plugin,nochain

with an identical command in another window in the same working
directory.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Robert Foley <robert.foley@linaro.org>
Tested-by: Robert Foley <robert.foley@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20200610155509.12850-3-alex.bennee@linaro.org>
Diffstat (limited to 'include/hw/ide/internal.h')
0 files changed, 0 insertions, 0 deletions