qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Vilanova, Lluis" <vilanova@imperial.ac.uk>
Cc: "matheus.ferst@eldorado.org.br" <matheus.ferst@eldorado.org.br>,
	"laurent@vivier.eu" <laurent@vivier.eu>,
	"stefanha@redhat.com" <stefanha@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: trace_FOO_tcg bit-rotted?
Date: Fri, 23 Apr 2021 16:14:59 +0100	[thread overview]
Message-ID: <87czul6n95.fsf@linaro.org> (raw)
In-Reply-To: <30c46fec5a5e5cf3d3f31c84da0e7f1efb0e8fcd.camel@imperial.ac.uk>


"Vilanova, Lluis" <vilanova@imperial.ac.uk> writes:

> El dt. 13 de 04 de 2021 a les 10:25 +0100, en/na Alex Bennée va
> escriure:
>> Stefan Hajnoczi <stefanha@redhat.com> writes:
>> 
>> > On Mon, Apr 12, 2021 at 08:06:57PM +0100, Alex Bennée wrote:
>> > > 
>> > > Stefan Hajnoczi <stefanha@redhat.com> writes:
>> > > 
>> > > > On Fri, Apr 09, 2021 at 05:29:08PM +0100, Alex Bennée wrote:
>> > > > > 
>> > > > > Laurent Vivier <laurent@vivier.eu> writes:
>> > > > > 
>> > > > > > Le 06/04/2021 à 18:00, Alex Bennée a écrit :
>> > > > > > > Hi,
>> > > > > > > 
>> > > > > > > It's been awhile since I last played with this but I
>> > > > > > > think we are
>> > > > > > > suffering from not having some test cases for tracing
>> > > > > > > code
>> > > > > > > generation/execution in the tree. I tried adding a simple
>> > > > > > > trace point to
>> > > > > > > see if I could track ERET calls:
>> <snip>
>> > > > 
>> > > > Lluís: are you happy to deprecate tcg trace events in favor of
>> > > > TCG
>> > > > plugins?
>> <snip>
>> > 
>> > That said, I haven't used the TCG trace event functionality and
>> > maybe
>> > I'm missing something obvious that Lluís will point out :).
>> 
>> I've updated the Cc to what I think is Lluís current email as I was
>> getting bounces from the old academic address.
>
> Hi folks, long time no write; thanks for tracking me down :)
>
> I think it'd be great to deprecate TCG tracing in favour of the plugin
> interface, pushing some of the burden out of qemu.
>
> I haven't measured the performance of the plugin interface, but AFAIR
> TCG trace prints also use TCG helpers, so there should not be a lot of
> difference.

Pretty much. The only real difference is we don't have plugins enabled
by default as there is a small impact when no plugins are used do to the
insertion of dummy callbacks during code generation. We do this to avoid
a double-pass later.

> As Stefan pointed out, this means plugin writers will have to write
> their own TCG tracing code. Hopefully, the plugin API can be extended
> to integrate with qemu's logging backend (it seems qemu_plugin_outs
> goes somewhere else),

qemu_plugin_outs goes out via the logging backend - but not the tracing
subsystem. Do you think being able to emit tracepoints to simpletrace or
the dtrace/ftrace would be a useful extension to the API.

> and common plugins can be kept on a separate repo
> under the qemu umbrella for easier reuse (e.g., to provide the same
> functionality as TCG tracing).

Currently we have two areas in QEMU, tests/plugins which are very basic
and used in check-tcg to exercise the code and contrib/plugins where the
meatier plugins are defined. I'm happy (and encourage!) more to be added
there.

Do you have any documented uses of the trace subsystem that I could
re-implement in TCG plugins by way of example? I have the feeling it has
been used for academic papers but I haven't seen usage "in the wild".

>
>
> Cheers,
> Lluis


-- 
Alex Bennée


  reply	other threads:[~2021-04-23 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 16:00 trace_FOO_tcg bit-rotted? Alex Bennée
2021-04-06 17:24 ` no-reply
2021-04-07  9:08 ` Laurent Vivier
2021-04-09 16:29   ` Alex Bennée
2021-04-12 15:00     ` Stefan Hajnoczi
2021-04-12 19:06       ` Alex Bennée
2021-04-13  8:33         ` Stefan Hajnoczi
2021-04-13  9:25           ` Alex Bennée
2021-04-23 10:58             ` Vilanova, Lluis
2021-04-23 15:14               ` Alex Bennée [this message]
2021-04-27 13:00                 ` Vilanova, Lluis

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=87czul6n95.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=matheus.ferst@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vilanova@imperial.ac.uk \
    /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).