qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH v1 12/22] plugins: stxp test case from Aaron (!upstream)


From: Aaron Lindsay
Subject: Re: [PATCH v1 12/22] plugins: stxp test case from Aaron (!upstream)
Date: Tue, 1 Feb 2022 09:58:21 -0500

On Jan 25 09:17, Thomas Huth wrote:
> On 24/01/2022 21.15, Alex Bennée wrote:
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> > Cc: Aaron Lindsay <aaron@os.amperecomputing.com>
> > Message-ID: <YXCA62xdRDeueQR6@strawberry.localdomain>
> > 
> > ---
> > [AJB] this was for testing, I think you can show the same stuff with
> > the much more complete execlog now.
> > ---
> >   contrib/plugins/stxp-plugin.c     | 50 +++++++++++++++++++++++++++++++
> >   tests/tcg/aarch64/stxp.c          | 28 +++++++++++++++++
> >   contrib/plugins/Makefile          |  1 +
> >   tests/tcg/aarch64/Makefile.target |  3 ++
> >   4 files changed, 82 insertions(+)
> >   create mode 100644 contrib/plugins/stxp-plugin.c
> >   create mode 100644 tests/tcg/aarch64/stxp.c
> > 
> > diff --git a/contrib/plugins/stxp-plugin.c b/contrib/plugins/stxp-plugin.c
> > new file mode 100644
> > index 0000000000..432cf8c1ed
> > --- /dev/null
> > +++ b/contrib/plugins/stxp-plugin.c
> > @@ -0,0 +1,50 @@
> > +#include <stdio.h>
> > +#include <stdarg.h>
> > +#include <qemu-plugin.h>
> > +
> > +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
> > +
> > +void qemu_logf(const char *str, ...)
> > +{
> > +    char message[1024];
> > +    va_list args;
> > +    va_start(args, str);
> > +    vsnprintf(message, 1023, str, args);
> > +
> > +    qemu_plugin_outs(message);
> > +
> > +    va_end(args);
> > +}
> > +
> > +void before_insn_cb(unsigned int cpu_index, void *udata)
> > +{
> > +    uint64_t pc = (uint64_t)udata;
> > +    qemu_logf("Executing PC: 0x%" PRIx64 "\n", pc);
> > +}
> > +
> > +static void mem_cb(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, 
> > uint64_t va, void *udata)
> 
> Could you please break the line to avoid checkpatch errors:
> 
> ERROR: line over 90 characters
> #63: FILE: contrib/plugins/stxp-plugin.c:25:
> +static void mem_cb(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo,
> uint64_t va, void *udata)
> 
> ERROR: line over 90 characters
> #77: FILE: contrib/plugins/stxp-plugin.c:39:
> +        qemu_plugin_register_vcpu_insn_exec_cb(insn, before_insn_cb,
> QEMU_PLUGIN_CB_R_REGS, (void *)pc);
> 
> ERROR: line over 90 characters
> #78: FILE: contrib/plugins/stxp-plugin.c:40:
> +        qemu_plugin_register_vcpu_mem_cb(insn, mem_cb,
> QEMU_PLUGIN_CB_NO_REGS, QEMU_PLUGIN_MEM_RW, (void*)pc);
> 
> ERROR: "(foo*)" should be "(foo *)"
> #78: FILE: contrib/plugins/stxp-plugin.c:40:
> +        qemu_plugin_register_vcpu_mem_cb(insn, mem_cb,
> QEMU_PLUGIN_CB_NO_REGS, QEMU_PLUGIN_MEM_RW, (void*)pc);
> 
> total: 4 errors, 1 warnings, 92 lines checked

For whatever it's worth, I don't think Alex's intention is to upstream
this code.

-Aaron



reply via email to

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