qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 54/55] plugins: add qemu_plugin_outs and use it


From: Richard Henderson
Subject: Re: [PATCH v5 54/55] plugins: add qemu_plugin_outs and use it
Date: Mon, 14 Oct 2019 10:03:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/14/19 3:49 AM, Alex Bennée wrote:
> Having the plugins grab stdout and spew stuff there is a bit ugly and
> certainly makes the tests look ugly. Provide a hook back into QEMU
> which can be redirected as needed.
> 
> For the newer plugins that use GString already this falls out pretty
> naturally. For the older printf style plugins we convert to
> g_strdup_printf and pass that. While we are at it we can use
> g_autoptr/g_autofree to let the compiler worry about freeing things.
> 
> Signed-off-by: Alex Bennée <address@hidden>
> ---
>  include/qemu/log.h           |  1 +
>  include/qemu/qemu-plugin.h   |  6 ++++++
>  plugins/api.c                |  8 ++++++++
>  plugins/qemu-plugins.symbols |  1 +
>  tests/plugin/bb.c            | 12 +++++-------
>  tests/plugin/hotblocks.c     | 10 ++--------
>  tests/plugin/hotpages.c      | 12 +++---------
>  tests/plugin/howvec.c        | 15 ++-------------
>  tests/plugin/insn.c          | 10 ++++------
>  tests/plugin/mem.c           | 12 ++++++------
>  tests/tcg/Makefile.target    |  2 ++
>  util/log.c                   |  3 +++
>  12 files changed, 43 insertions(+), 49 deletions(-)

This also would be better sorted earlier, and the plugins done once.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]