All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuseppe Eletto <giuseppe.eletto@edu.unito.it>
To: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>,
	xen-devel@lists.xenproject.org,
	 linux-trace-devel@vger.kernel.org
Cc: Dario Faggioli <dfaggioli@suse.com>, Enrico Bini <enrico.bini@unito.it>
Subject: Re: A KernelShark plugin for Xen traces analysis ​
Date: Thu, 15 Apr 2021 16:22:30 +0200	[thread overview]
Message-ID: <CALTQNB7-cj8x1y5Xy_xJf-wYfQVFsYZkqwCmM-MAHt19Gy-9xQ@mail.gmail.com> (raw)
In-Reply-To: <8b43ae47-9d7e-a95c-4573-852d09f99662@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3829 bytes --]

Hi,

As Dario already said, the plugin seems to work well with all the traces we
fed to it.
The largest trace was nearly 500MB, but still it had no trouble showing it.

The only minor troubles I encountered writing the plugin is with the
different data
types between KShark and XenTrace: for example regarding the "event_id"
field of
the "struct kshark_entry" structure which in KShark has type "int16_t"
while XenTrace
has events of the type "uint32_t" at 28 bits.
But since there are functions like "get_event_id" these differences can be
bypassed without seemingly creating problems.

So yes, the plugin is still a prototype. The main purpose so far was to
create
something that works: in fact, as mr. @Andrew_Cooper pointed out, the
couple
"dom:vcpu" is still displayed as a HEX number without any kind of
formatting.
This is because at the moment I have copied the same formatting as the
"xentrace_format" tool.
So a future plan for updating this plugin could be to improve its output.

As for the tutorial, I wouldn't mind trying, but right now I'm busy writing
the thesis for the graduation...

Kind regards,
Giuseppe Eletto.

Il giorno mer 14 apr 2021 alle ore 11:26 Yordan Karadzhov (VMware) <
y.karadz@gmail.com> ha scritto:

> Hi Giuseppe,
>
> It is great to see such progress in the development of the Xen plugin.
>
> Can you share with us what are your plans for continuing this work. Is
> this a first prototype of the plugin, or it is an almost final version?
>
> I was also thinking that maybe you can prepare a short tutorial on
> writing KernelShark plugins for data inputs. You have the best
> experience for this task, since you are the first to develop an external
> plugin. Ideally, this can even turn into a talk that you can give at
> some open source event.
> What do you think?
>
> Best,
> Yordan
>
>
> On 13.04.21 г. 17:28, Giuseppe Eletto wrote:
> > Hello,
> > I want to share with you a new plugin developed by me, under the
> > supervision of Dario Faggioli, which allows the new version of
> KernelShark
> > (the v2-beta) to open and view the Xen traces created using the
> "xentrace" tool.
> >
> > 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.
> >
> > For more information on how to build the plugin and/or
> > to view the source code I leave the repository below:
> > https://github.com/giuseppe998e/kernelshark-xentrace-plugin
> >
> >
> > In short:
> >
> > $ sudo apt install git build-essential libjson-c-dev
> > $ git clone --recurse-submodules
> > https://github.com/giuseppe998e/kernelshark-xentrace-plugin.git
> > $ cd kernelshark-xentrace-plugin/
> > $ make
> >
> > $ export XEN_CPUHZ=3G # Sets the CPU frequency ((G)hz/(M)hz/(K)hz/hz)
> > $ kernelshark -p out/ks-xentrace.so trace.xen
> >
> >
> > You will need the development version of KernelShark, available here:
> > https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git
> >
> > 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.
> >
> > Kind regards,
> > Giuseppe Eletto.
> >
>

-- 
------------------------



Indirizzo istituzionale di posta elettronica 
degli studenti e dei laureati dell'Università degli Studi di TorinoOfficial 
University of Turin email address for students and graduates 

[-- Attachment #2: Type: text/html, Size: 5565 bytes --]

      parent reply	other threads:[~2021-04-15 14:23 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
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 [this message]

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=CALTQNB7-cj8x1y5Xy_xJf-wYfQVFsYZkqwCmM-MAHt19Gy-9xQ@mail.gmail.com \
    --to=giuseppe.eletto@edu.unito.it \
    --cc=dfaggioli@suse.com \
    --cc=enrico.bini@unito.it \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=y.karadz@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 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.