qemu-e2k/contrib
Alex Bennée a622d64eea plugins: new hwprofile plugin
This is a plugin intended to help with profiling access to various
bits of system hardware. It only really makes sense for system
emulation.

It takes advantage of the recently exposed helper API that allows us
to see the device name (memory region name) associated with a device.

You can specify arg=read or arg=write to limit the tracking to just
reads or writes (by default it does both).

The pattern option:

  -plugin ./tests/plugin/libhwprofile.so,arg=pattern

will allow you to see the access pattern to devices, eg:

  gic_cpu @ 0xffffffc010040000
    off:00000000, 8, 1, 8, 1
    off:00000000, 4, 1, 4, 1
    off:00000000, 2, 1, 2, 1
    off:00000000, 1, 1, 1, 1

The source option:

  -plugin ./tests/plugin/libhwprofile.so,arg=source

will track the virtual source address of the instruction making the
access:

  pl011 @ 0xffffffc010031000
    pc:ffffffc0104c785c, 1, 4, 0, 0
    pc:ffffffc0104c7898, 1, 4, 0, 0
    pc:ffffffc010512bcc, 2, 1867, 0, 0

You cannot mix source and pattern.

Finally the match option allow you to limit the tracking to just the
devices you care about.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Robert Foley <robert.foley@linaro.org>
Message-Id: <20210213130325.14781-4-alex.bennee@linaro.org>
2021-02-18 08:16:55 +00:00
..
elf2dmp elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE 2021-01-20 10:46:54 +01:00
gitdm contrib/gitdm: Add more individual contributors 2020-10-27 09:53:47 +00:00
ivshmem-client contrib/: fix some comment spelling errors 2020-09-17 20:41:44 +02:00
ivshmem-server contrib/ivshmem: convert to meson 2020-08-21 06:30:11 -04:00
plugins plugins: new hwprofile plugin 2021-02-18 08:16:55 +00:00
rdmacm-mux contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid() 2020-12-18 20:15:42 +02:00
systemd contrib: add systemd unit files 2017-12-20 22:29:26 +01:00
vhost-user-blk contrib/vhost-user-blk: avoid g_return_val_if() input validation 2020-12-09 13:04:17 -05:00
vhost-user-gpu vhost-user-gpu: handle display-info in a callback 2021-02-04 15:58:54 +01:00
vhost-user-input Clean up includes 2020-12-10 17:16:44 +01:00
vhost-user-scsi libiscsi: convert to meson 2021-01-02 21:03:37 +01:00