All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Dario Faggioli <dfaggioli@suse.com>
Cc: Giuseppe Eletto <giuseppe.eletto@edu.unito.it>,
	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: Wed, 14 Apr 2021 18:25:24 -0400	[thread overview]
Message-ID: <20210414182524.0e51a520@gandalf.local.home> (raw)
In-Reply-To: <28ac9c046cc521cbaef9c2ff56911cd7b3100ac4.camel@suse.com>

On Thu, 15 Apr 2021 00:11:32 +0200
Dario Faggioli <dfaggioli@suse.com> wrote:

 
> 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).

Right, that's exactly what the ESX trace did as well.

> > 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.
> 

Yeah, we would like to have trace-cmd agent work with more than just vsock.
Heck, we could just use networking as well. It's just a bit more overhead.


> > 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

Really, TSC is the way to go. All you would need to do is to have a way to
map all the TSCs together. Assuming the xen trace has a unmodified TSC, and
you can retrieve all the multipliers and shifts used for each guest, you
then will have a synchronized TSC. Then only one guest or the xen HV needs
to calculate the TSC to nanoseconds, and then have all use that. Probably
would need to be the xen HV as it would be the one without a modified TSC.

-- Steve

  reply	other threads:[~2021-04-14 22:25 UTC|newest]

Thread overview: 28+ 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 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  0:50           ` Dario Faggioli
2021-04-15 13:29           ` Steven Rostedt
2021-04-15 13:29             ` Steven Rostedt
2021-04-14 21:51       ` A KernelShark plugin for Xen traces analysis ​ Dario Faggioli
2021-04-14 21:51         ` 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:41           ` Dario Faggioli
2021-04-15  0:13     ` Dario Faggioli
2021-04-15  0:13       ` Dario Faggioli
2021-04-14 22:11   ` Dario Faggioli
2021-04-14 22:11     ` Dario Faggioli
2021-04-14 22:25     ` Steven Rostedt [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
2021-04-14 17:46     ` Dario Faggioli
2021-04-15 14:22   ` Giuseppe Eletto

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=20210414182524.0e51a520@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=dfaggioli@suse.com \
    --cc=enrico.bini@unito.it \
    --cc=giuseppe.eletto@edu.unito.it \
    --cc=linux-trace-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.