summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Bennée2022-09-29 13:42:15 +0200
committerAlex Bennée2022-10-06 12:53:40 +0200
commitb7855bf65f5bed868b06d6492a6d8a174f6cb71b (patch)
tree7e65b426592f7e7201a0bed2a26f1cb9961b81ed /docs
parentdisas: use result of ->read_memory_func (diff)
downloadqemu-b7855bf65f5bed868b06d6492a6d8a174f6cb71b.tar.gz
qemu-b7855bf65f5bed868b06d6492a6d8a174f6cb71b.tar.xz
qemu-b7855bf65f5bed868b06d6492a6d8a174f6cb71b.zip
plugins: extend execlog to filter matches
Sometimes the whole execlog is just two much so add the ability to filter by instruction opcode or address. [AJB: this shows for example qemu-system-aarch64 -display none -serial mon:stdio \ -M virt -cpu max \ -semihosting-config enable=on \ -kernel ./tests/tcg/aarch64-softmmu/memory-sve \ -plugin ./contrib/plugins/libexeclog.so,ifilter=st1w,afilter=0x40001808 -d plugin -D plugin.out the st1w SVE instruction is not instrumenting its stores.] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alexandre Iooss <erdnaxe@crans.org> Cc: Robert Henry <robhenry@microsoft.com> Cc: Aaron Lindsay <aaron@os.amperecomputing.com> Message-Id: <20220929114231.583801-36-alex.bennee@linaro.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/tcg-plugins.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index a7cc44aa20..a503d44cee 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -346,7 +346,7 @@ The execlog tool traces executed instructions with memory access. It can be used
for debugging and security analysis purposes.
Please be aware that this will generate a lot of output.
-The plugin takes no argument::
+The plugin needs default argument::
qemu-system-arm $(QEMU_ARGS) \
-plugin ./contrib/plugins/libexeclog.so -d plugin
@@ -364,6 +364,13 @@ which will output an execution trace following this structure::
0, 0xd34, 0xf9c8f000, "bl #0x10c8"
0, 0x10c8, 0xfff96c43, "ldr r3, [r0, #0x44]", load, 0x200000e4, RAM
+the output can be filtered to only track certain instructions or
+addresses using the `ifilter` or `afilter` options. You can stack the
+arguments if required::
+
+ qemu-system-arm $(QEMU_ARGS) \
+ -plugin ./contrib/plugins/libexeclog.so,ifilter=st1w,afilter=0x40001808 -d plugin
+
- contrib/plugins/cache.c
Cache modelling plugin that measures the performance of a given L1 cache