From: Thomas Huth <thuth@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: fam@euphon.net, berrange@redhat.com,
richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org,
aurelien@aurel32.net
Subject: Re: [PATCH v2 10/10] plugins: move the more involved plugins to contrib
Date: Wed, 9 Sep 2020 15:57:05 +0200 [thread overview]
Message-ID: <3af24c63-c439-d50c-f453-2b6c4ca24253@redhat.com> (raw)
In-Reply-To: <20200909112742.25730-11-alex.bennee@linaro.org>
On 09/09/2020 13.27, Alex Bennée wrote:
> We have an exploding complexity problem in the testing so lets just
> move the more involved plugins into contrib. tests/plugins still exist
> for the basic plugins that exercise the API. We restore the old
> pre-meson style Makefile for contrib as it also doubles as a guide for
> out-of-tree plugin builds.
>
> While we are at it add some examples to the documentation and a
> specific plugins build target.
[...]
> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
> index a05990906cc..e079695caf9 100644
> --- a/docs/devel/tcg-plugins.rst
> +++ b/docs/devel/tcg-plugins.rst
> @@ -134,3 +134,145 @@ longer want to instrument the code. This operation is asynchronous
> which means callbacks may still occur after the uninstall operation is
> requested. The plugin isn't completely uninstalled until the safe work
> has executed while all vCPUs are quiescent.
> +
> +Example Plugins
> +===============
> +
> +There are a number of plugins included with QEMU and you are
> +encouraged to contribute them upstream.
s/contribute them/contribute your own plugins/ ?
> There is a `contrib/plugins`
> +directory where they can go.
> +
> +- tests/plugins
> +
> +These are some basic plugins that are used to test and exercise the
> +API during the `make check-tcg` target.
> +
> +- contrib/plugins/hotblocks.c
> +
> +The hotblocks plugin allows you to examine the where hot paths of
> +execution are in your program. Once the program has finished you will
> +get a sorted list of blocks reporting the starting PC, translation
> +count, number of instructions and execution count. This will work best
> +with linux-user execution as system emulation tends to generate
> +re-translations as blocks from different programs get swapped in and
> +out of system memory.
> +
> +If your program is single-threaded you can use the `inline` option for
> +slightly faster (but not thread safe) counters.
> +
> +Example::
> +
> + ./aarch64-linux-user/qemu-aarch64 -plugin contrib/plugins/libhotblocks.so -d plugin ./tests/tcg/aarch64-linux-user/sha1
Maybe break long lines with a backslash ?
> + SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6
> + collected 903 entries in the hash table
> + pc, tcount, icount, ecount
> + 0x0000000041ed10, 1, 5, 66087
> + 0x000000004002b0, 1, 4, 66087
> + ...
> +
> +- contrib/plugins/hotpages.c
> +
> +Similar to hotblocks but this time tracks memory accesses::
> +
> + ./aarch64-linux-user/qemu-aarch64 -plugin contrib/plugins/libhotpages.so -d plugin ./tests/tcg/aarch64-linux-user/sha1
dito ?
Thomas
prev parent reply other threads:[~2020-09-09 13:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 11:27 [PATCH v2 00/10] testing and misc updates Alex Bennée
2020-09-09 11:27 ` [PATCH v2 01/10] CODING_STYLE.rst: flesh out our naming conventions Alex Bennée
2020-09-09 13:44 ` Thomas Huth
2020-09-09 11:27 ` [PATCH v2 02/10] usb-host: restrict workaround to new libusb versions Alex Bennée
2020-09-09 11:27 ` [PATCH v2 03/10] tests/meson.build: fp tests don't need CONFIG_TCG Alex Bennée
2020-09-09 13:03 ` Philippe Mathieu-Daudé
2020-09-09 11:27 ` [PATCH v2 04/10] target/mips: simplify gen_compute_imm_branch logic Alex Bennée
2020-09-09 11:27 ` [PATCH v2 05/10] docs/system/deprecated: mark ppc64abi32-linux-user for deprecation Alex Bennée
2020-09-09 12:59 ` Philippe Mathieu-Daudé
2020-09-09 11:27 ` [PATCH v2 06/10] configure: don't enable ppc64abi32-linux-user by default Alex Bennée
2020-09-09 12:57 ` Philippe Mathieu-Daudé
2020-09-09 11:27 ` [PATCH v2 07/10] hw/i386: make explicit clearing of pch_rev_id Alex Bennée
2020-09-09 12:58 ` Philippe Mathieu-Daudé
2020-09-09 11:27 ` [PATCH v2 08/10] tests: bump avocado version Alex Bennée
2020-09-09 11:27 ` [PATCH v2 09/10] tests/acceptance: Add Test.fetch_asset(cancel_on_missing=True) Alex Bennée
2020-09-09 11:27 ` [PATCH v2 10/10] plugins: move the more involved plugins to contrib Alex Bennée
2020-09-09 13:57 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3af24c63-c439-d50c-f453-2b6c4ca24253@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=cota@braap.org \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).