From: Dario Faggioli <dfaggioli@suse.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Giuseppe Eletto <giuseppe.eletto@edu.unito.it>
Cc: linux-trace-devel@vger.kernel.org,
xen-devel@lists.xenproject.org,
Enrico Bini <enrico.bini@unito.it>
Subject: Re: A KernelShark plugin for Xen traces analysis
Date: Thu, 15 Apr 2021 00:11:32 +0200 [thread overview]
Message-ID: <28ac9c046cc521cbaef9c2ff56911cd7b3100ac4.camel@suse.com> (raw)
In-Reply-To: <20210413114614.4971caff@gandalf.local.home>
[-- Attachment #1: Type: text/plain, Size: 3129 bytes --]
On Tue, 2021-04-13 at 11:46 -0400, Steven Rostedt wrote:
> On Tue, 13 Apr 2021 16:28:36 +0200
> Giuseppe Eletto <giuseppe.eletto@edu.unito.it> wrote:
> >
> > In fact, KernelShark is a well known tool for graphical
> > visualization
> > Linux kernel traces, obtained via "ftrace" and "trace-cmd". Anyway
> > thanks
> > to its modular architecture, it is now possible to implement
> > plugins which
> > open and display traces with arbitrary format, for example, as in
> > in
> > this case, traces of the Xen hypervisor.
>
> I'm guessing you have trace events coming from Xen itself?
>
Yes, basically, we can say that a Xen system has "its own trace-cmd".
It's called `xentrace`, you run it from Dom0 and you get a (binary)
file which contains a bunch of events.
Not that differently from a trace-cmd's "trace.dat" file, but the
events in there comes from tracepoints within the hypervisor (which, of
course, use a different tracing mechanism than ftrace).
>
> > A screenshot of the plugin in action is available here:
> > https://github.com/giuseppe998e/kernelshark-xentrace-plugin/raw/master/.github/img/ks-xentrace.png
> >
> > I'm happy to receive whatever feedback you may have about it,
> > and to answer any question.
> >
>
> Thanks for doing this. What would be nice is to have the xen traces
> along
> side the linux tracing.
>
Indeed! :-P
> Perhaps we can update trace-cmd agent to work with
> Xen as well. Does xen implement vsock or some other way to
> communicate
> between the guests and the Dom0 kernel?
>
Not vsock, AFAIK. But we probably can use something else/come up with
something new.
> 1. On each guest, run as root: trace-cmd agent --xen
> 2. On Dom0 run: trace-cmd record -e (events on Dom0) \
> --xen (commands to do tracing in Xen HV) \
> -A <guest-name1> -e (events on guest)
>
> And then you would get a trace.dat file for Dom0 and the guest, and
> also
> have a trace file for Xen (however that is done).
>
Yep, and the implementation of the `--xen (commands to do tracing in
Xen HV)` part, can just "call-in" to xentrace (somehow), and we'll get
the trace.xen file that then can be interpreted with this plugin.
> And then on KernelShark,
> we have a KVM plugin in development that does this. But you can do
> the same
> with Xen.
>
I think that one of the trickiest aspects would be synchronizing the
timestamps in the 3 traces.
*I guess* that the dom0 trace and the guest traces could at least use
the PTP algorithm that is currently implemented in the trace-cmd
patches (but not KVM specific one). For synch'ing the Xen trace with
them, well, I don't really know... We'd have to think about it. :-P
> Perhaps we can do something like that with Xen as well.
>
Would be awesome, IMO. :-)
Thanks and Regards
--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-04-14 22:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 14:28 A KernelShark plugin for Xen traces analysis Giuseppe Eletto
2021-04-13 15:33 ` Andrew Cooper
2021-04-14 17:31 ` Dario Faggioli
2021-04-14 18:11 ` Andrew Cooper
2021-04-14 19:07 ` A KernelShark plugin for Xen traces analysis Steven Rostedt
2021-04-15 0:50 ` Dario Faggioli
2021-04-15 13:29 ` Steven Rostedt
2021-04-14 21:51 ` A KernelShark plugin for Xen traces analysis Dario Faggioli
2021-04-13 15:46 ` A KernelShark plugin for Xen traces analysis Steven Rostedt
2021-04-14 10:07 ` Andrew Cooper
2021-04-14 13:43 ` Steven Rostedt
2021-04-14 20:05 ` Andrew Cooper
2021-04-15 0:41 ` Dario Faggioli
2021-04-15 0:13 ` Dario Faggioli
2021-04-14 22:11 ` Dario Faggioli [this message]
2021-04-14 22:25 ` Steven Rostedt
2021-04-14 9:25 ` A KernelShark plugin for Xen traces analysis Yordan Karadzhov (VMware)
2021-04-14 17:46 ` Dario Faggioli
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=28ac9c046cc521cbaef9c2ff56911cd7b3100ac4.camel@suse.com \
--to=dfaggioli@suse.com \
--cc=enrico.bini@unito.it \
--cc=giuseppe.eletto@edu.unito.it \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=xen-devel@lists.xenproject.org \
/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).