qemu-e2k/contrib/plugins
Alex Bennée af6e4e0a22 contrib/plugins: extend execlog to track register changes
With the new plugin register API we can now track changes to register
values. Currently the implementation is fairly dumb which will slow
down if a large number of register values are being tracked. This
could be improved by only instrumenting instructions which mention
registers we are interested in tracking.

Example usage:

  ./qemu-aarch64 -D plugin.log -d plugin \
     -cpu max,sve256=on \
     -plugin contrib/plugins/libexeclog.so,reg=sp,reg=z\* \
     ./tests/tcg/aarch64-linux-user/sha512-sve

will display in the execlog any changes to the stack pointer (sp) and
the SVE Z registers.

As testing registers every instruction will be quite a heavy operation
there is an additional flag which attempts to optimise the register
tracking by only instrumenting instructions which are likely to change
its value. This relies on the QEMU disassembler showing up the register
names in disassembly so is an explicit opt-in.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Based-On:  <20231025093128.33116-19-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240227144335.1196131-27-alex.bennee@linaro.org>
2024-02-28 09:11:42 +00:00
..
cache.c plugins: remove previous n_vcpus functions from API 2024-02-28 09:11:34 +00:00
drcov.c contrib/plugins/drcov: Fix string format 2023-09-07 12:54:17 +02:00
execlog.c contrib/plugins: extend execlog to track register changes 2024-02-28 09:11:42 +00:00
hotblocks.c contrib/plugins: fix coverity warning in hotblocks 2023-10-11 08:46:39 +01:00
hotpages.c plugins: fix memory leak while parsing options 2023-07-03 12:51:58 +01:00
howvec.c contrib/plugins/howvec: Fix string format 2023-09-07 12:54:17 +02:00
hwprofile.c plugins: fix memory leak while parsing options 2023-07-03 12:51:58 +01:00
lockstep.c contrib/plugins: Close file descriptor on error return 2023-10-31 14:10:21 +00:00
Makefile plugins: fix win plugin tests on cross compile 2023-11-23 14:10:04 +00:00
win32_linker.c plugins: make test/example plugins work on windows 2023-11-08 15:15:23 +00:00