From: Anthony Liguori <anthony@codemonkey.ws>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Zhi Yong Wu <zwu.kernel@gmail.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/5] backdoor: lightweight guest-to-QEMU backdoor channel
Date: Wed, 07 Dec 2011 11:48:29 -0600 [thread overview]
Message-ID: <4EDFA6ED.20907@codemonkey.ws> (raw)
In-Reply-To: <87aa74gvxj.fsf@ginnungagap.bsc.es>
On 12/07/2011 10:59 AM, Lluís Vilanova wrote:
> Anthony Liguori writes:
>>> Well, both backdoor and trace instrumentation are implemented using the same
>>> approach (a static library selected at compile-time). The user sets which events
>>> to instrument in the "trace-events" file. This has the effect that the tracetool
>>> script will not generate the tracing functions for those events, and instead the
>>> user must provide the implementation for these events on a static library
>>> provided at compile time.
>
>> I don't think this is the right approach to tracing. What not just use
>> something like SystemTap to implement logic around tracing?
>
>> http://blog.vmsplice.net/2011/03/how-to-write-trace-analysis-scripts-for.html
>
> This would only allow me to post-process all the traces, with no possible
> interaction with qemy from the analysis library.
>
> Compiling the analysis library into qemu itself lets me control when TCG code to
> actually trace an instruction is generated (with guest code, trace events are
> instrumented at both code translation and code execution time):
>
> translate:
> gen_helper_trace_mem(...)
> -- trace instrumentation --> ... if (...) gen_helper_trace_mem_backend(...); ...
> -- otherwise --> gen_helper_trace_mem_backend(...);
>
> execute:
> helper_trace_mem(...)
> trace_mem(...)
> -- trace instrumentation --> ... whatever ...
> -- otherwise --> trace_fetch_backend(...);
>
> One could argue that gen_helper_trace_mem can just check some in-qemu central
> structure to see if it must generate the call to helper_trace_mem, but then the
> best you can do is an all-or-nothing on a per-event basis.
>
> You must have in mind that we're talking about an extreme tracing bandwidth
> here, so the analyzer is willing to filter-out as many events as soon as
> possible (e.g., just tracing a specific set of IPs can be optimized at
> translation time, and tracing instructions using specific registers can be
> optimized by generating extra checks with TCG). This requires some sort of
> in-line communication between qemu and the analyzer.
Why should this analyzer live outside of QEMU in the first place? I fail to see
the rationale for that other than not wanting to do the work of making it
suitable for upstream consumption.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2011-12-07 17:48 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 22:22 [Qemu-devel] [PATCH v2 0/5] backdoor: lightweight guest-to-QEMU backdoor channel Lluís Vilanova
2011-12-05 22:22 ` [Qemu-devel] [PATCH v2 1/5] backdoor: Add documentation Lluís Vilanova
2011-12-06 22:36 ` Peter Maydell
2011-12-06 22:51 ` Anthony Liguori
2011-12-06 22:50 ` Anthony Liguori
2011-12-05 22:22 ` [Qemu-devel] [PATCH v2 2/5] backdoor: Add build infrastructure Lluís Vilanova
2011-12-05 22:22 ` [Qemu-devel] [PATCH v2 3/5] backdoor: [*-user] Add QEMU-side proxy to "libbackdoor.a" Lluís Vilanova
2011-12-05 22:23 ` [Qemu-devel] [PATCH v2 4/5] backdoor: [softmmu] " Lluís Vilanova
2011-12-06 19:55 ` Anthony Liguori
2011-12-06 22:30 ` Lluís Vilanova
2011-12-06 22:35 ` Anthony Liguori
2011-12-06 22:37 ` Peter Maydell
2011-12-07 8:21 ` [Qemu-devel] Insane virtio-serial semantics (was: [PATCH v2 4/5] backdoor: [softmmu] Add QEMU-side proxy to "libbackdoor.a") Markus Armbruster
2011-12-07 13:49 ` [Qemu-devel] Insane virtio-serial semantics Anthony Liguori
2011-12-07 19:44 ` Michael Roth
2011-12-07 19:53 ` Anthony Liguori
2011-12-08 10:11 ` Markus Armbruster
2011-12-08 14:37 ` Anthony Liguori
2011-12-06 22:39 ` [Qemu-devel] [PATCH v2 4/5] backdoor: [softmmu] Add QEMU-side proxy to "libbackdoor.a" Lluís Vilanova
2011-12-05 22:23 ` [Qemu-devel] [PATCH v2 5/5] backdoor: Add guest-side library Lluís Vilanova
2011-12-06 22:52 ` [Qemu-devel] [PATCH v2 0/5] backdoor: lightweight guest-to-QEMU backdoor channel Anthony Liguori
2011-12-07 12:21 ` Lluís Vilanova
2011-12-07 13:55 ` Anthony Liguori
2011-12-07 15:23 ` Lluís Vilanova
2011-12-07 15:48 ` Anthony Liguori
2011-12-07 16:59 ` Lluís Vilanova
2011-12-07 17:48 ` Anthony Liguori [this message]
2011-12-07 18:35 ` Lluís Vilanova
2011-12-07 18:51 ` Peter Maydell
2011-12-07 18:54 ` Anthony Liguori
2011-12-07 20:13 ` Lluís Vilanova
2011-12-07 22:03 ` Lluís Vilanova
2011-12-08 20:45 ` Blue Swirl
2011-12-08 14:05 ` Stefan Hajnoczi
2011-12-08 18:57 ` Lluís Vilanova
2011-12-08 20:57 ` Blue Swirl
2011-12-08 22:16 ` Lluís Vilanova
2011-12-09 11:23 ` Stefan Hajnoczi
2011-12-09 20:55 ` Lluís Vilanova
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=4EDFA6ED.20907@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
--cc=zwu.kernel@gmail.com \
/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).