[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~
- [PATCH v5 50/55] include/exec: wrap cpu_ldst.h in CONFIG_TCG, (continued)
- [PATCH v5 50/55] include/exec: wrap cpu_ldst.h in CONFIG_TCG, Alex Bennée, 2019/10/14
- [PATCH v5 21/55] cpu: hook plugin vcpu events, Alex Bennée, 2019/10/14
- [PATCH v5 37/55] vl: support -plugin option, Alex Bennée, 2019/10/14
- [PATCH v5 40/55] tests/tcg/Makefile.target: fix path to config-host.mak, Alex Bennée, 2019/10/14
- [PATCH v5 49/55] accel/stubs: reduce headers from tcg-stub, Alex Bennée, 2019/10/14
- [PATCH v5 43/55] tests/tcg: drop test-i386-fprem from TESTS when not SLOW, Alex Bennée, 2019/10/14
- [PATCH v5 08/55] plugin: add core code, Alex Bennée, 2019/10/14
- [PATCH v5 54/55] plugins: add qemu_plugin_outs and use it, Alex Bennée, 2019/10/14
- Re: [PATCH v5 54/55] plugins: add qemu_plugin_outs and use it,
Richard Henderson <=
- [PATCH v5 33/55] target/xtensa: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 46/55] plugin: add qemu_plugin_insn_disas helper, Alex Bennée, 2019/10/14
- [PATCH v5 52/55] plugins: make howvec plugin more generic, Alex Bennée, 2019/10/14
- [PATCH v5 31/55] target/riscv: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 17/55] plugins: implement helpers for resolving hwaddr, Alex Bennée, 2019/10/14