All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, Steven Rostedt <rostedt@goodmis.org>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	lttng-dev@lists.lttng.org, Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [Qemu-devel] [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel
Date: Mon, 29 Aug 2016 09:45:02 -0400	[thread overview]
Message-ID: <20160829134502.GA26282@stefanha-x1.localdomain> (raw)
In-Reply-To: <87lgzm4g5p.fsf@fimbulvetr.bsc.es>

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

On Wed, Aug 24, 2016 at 12:25:54PM +0200, Lluís Vilanova wrote:
> Stefan Hajnoczi writes:
> 
> > On Sun, Aug 21, 2016 at 02:32:34PM +0200, Lluís Vilanova wrote:
> >> Unfortuntely, I've been unable to to make dtrace recognise QEMU's events (I'm
> >> only able to see the host kernel events). If someone with more experience on it
> >> can help me use dtrace with QEMU's events, I'll also add the supporting library
> >> to let dtrace do the callout to QEMU's moitor interface and control the events,
> >> and add a prperly useful example of that on the hypertrace docs (which was my
> >> original intention).
> 
> > Which "dtrace" and host OS are you using?
> 
> > QEMU builds with static user-space probes.  You need to tell DTrace or
> > SystemTap to enable those probes in order to record trace data.
> 
> I'm using debian on a 4.6.0-1-amd64 kernel with systemtap 3.0.6.
> 
> I just gave it another try, and works if I use probes like:
> 
>   process("<binary-path>").mark("<event-name>")
> 
> although they don't seem to appear on "stap -l" or anything like that (I cannot
> find a "qemu" provider). But I'm still unable to print the event values. This:

The following enumerates events for me:

$ sudo stap -L 'process("/usr/bin/qemu-system-x86_64").mark("*")'
process("/usr/bin/qemu-system-x86_64").mark("alsa_no_frames") $arg1:long
process("/usr/bin/qemu-system-x86_64").mark("alsa_pollout") $arg1:long $arg2:long
process("/usr/bin/qemu-system-x86_64").mark("alsa_read_zero") $arg1:long
...

You can also use /usr/share/systemtap/tapset/qemu-system-x86_64.stp.
I'm running Fedora 24 with qemu-system-x86 2.6.0-5.fc24 and SystemTap
3.0-3.fc24.

> Also, I'm still not sure how to interact with QEMU's monitor interface from
> within the probe code (probes execute in kernel mode, including "guru mode"
> code).

When SystemTap is used the QEMU monitor interface does nothing.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, Steven Rostedt <rostedt@goodmis.org>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	lttng-dev@lists.lttng.org, Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel
Date: Mon, 29 Aug 2016 09:45:02 -0400	[thread overview]
Message-ID: <20160829134502.GA26282@stefanha-x1.localdomain> (raw)
In-Reply-To: <87lgzm4g5p.fsf@fimbulvetr.bsc.es>

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

On Wed, Aug 24, 2016 at 12:25:54PM +0200, Lluís Vilanova wrote:
> Stefan Hajnoczi writes:
> 
> > On Sun, Aug 21, 2016 at 02:32:34PM +0200, Lluís Vilanova wrote:
> >> Unfortuntely, I've been unable to to make dtrace recognise QEMU's events (I'm
> >> only able to see the host kernel events). If someone with more experience on it
> >> can help me use dtrace with QEMU's events, I'll also add the supporting library
> >> to let dtrace do the callout to QEMU's moitor interface and control the events,
> >> and add a prperly useful example of that on the hypertrace docs (which was my
> >> original intention).
> 
> > Which "dtrace" and host OS are you using?
> 
> > QEMU builds with static user-space probes.  You need to tell DTrace or
> > SystemTap to enable those probes in order to record trace data.
> 
> I'm using debian on a 4.6.0-1-amd64 kernel with systemtap 3.0.6.
> 
> I just gave it another try, and works if I use probes like:
> 
>   process("<binary-path>").mark("<event-name>")
> 
> although they don't seem to appear on "stap -l" or anything like that (I cannot
> find a "qemu" provider). But I'm still unable to print the event values. This:

The following enumerates events for me:

$ sudo stap -L 'process("/usr/bin/qemu-system-x86_64").mark("*")'
process("/usr/bin/qemu-system-x86_64").mark("alsa_no_frames") $arg1:long
process("/usr/bin/qemu-system-x86_64").mark("alsa_pollout") $arg1:long $arg2:long
process("/usr/bin/qemu-system-x86_64").mark("alsa_read_zero") $arg1:long
...

You can also use /usr/share/systemtap/tapset/qemu-system-x86_64.stp.
I'm running Fedora 24 with qemu-system-x86 2.6.0-5.fc24 and SystemTap
3.0-3.fc24.

> Also, I'm still not sure how to interact with QEMU's monitor interface from
> within the probe code (probes execute in kernel mode, including "guru mode"
> code).

When SystemTap is used the QEMU monitor interface does nothing.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-08-29 13:45 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05 16:59 [Qemu-devel] [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 1/6] hypertrace: Add documentation Lluís Vilanova
2016-08-05 17:17   ` Eric Blake
2016-08-08 13:02     ` Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypertrace" Lluís Vilanova
2016-08-18  9:59   ` Stefan Hajnoczi
2016-08-18 10:32     ` Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 3/6] hypertrace: [*-user] Add QEMU-side proxy to "guest_hypertrace" event Lluís Vilanova
2016-08-05 17:23   ` Eric Blake
2016-08-08 13:08     ` Lluís Vilanova
2016-08-18 10:17   ` Stefan Hajnoczi
2016-08-21 12:15     ` Lluís Vilanova
2016-08-23 15:52       ` Stefan Hajnoczi
2016-08-05 16:59 ` [Qemu-devel] [PATCH 4/6] hypertrace: [softmmu] " Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 5/6] hypertrace: Add guest-side user-level library Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 6/6] hypertrace: Add guest-side Linux module Lluís Vilanova
2016-08-18  9:47 ` [Qemu-devel] [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel Stefan Hajnoczi
2016-08-18  9:47   ` Stefan Hajnoczi
2016-08-18 10:22   ` [Qemu-devel] " Lluís Vilanova
2016-08-18 13:53     ` Stefan Hajnoczi
2016-08-18 14:21       ` Luiz Capitulino
2016-08-21 12:17         ` Lluís Vilanova
2016-08-21 12:17         ` Lluís Vilanova
2016-08-18 14:21       ` Luiz Capitulino
2016-08-18 13:53     ` Stefan Hajnoczi
2016-08-18 10:22   ` Lluís Vilanova
2016-08-18 10:54 ` Stefan Hajnoczi
2016-08-18 10:54   ` Stefan Hajnoczi
2016-08-18 13:37   ` [Qemu-devel] " Luiz Capitulino
2016-08-19  4:45     ` Masami Hiramatsu
2016-08-19  4:45       ` Masami Hiramatsu
2016-08-18 13:37   ` [Qemu-devel] " Luiz Capitulino
2016-08-18 16:19   ` Steven Rostedt
2016-08-19 10:02     ` Stefan Hajnoczi
2016-08-19 13:30       ` Steven Rostedt
2016-08-19 13:30       ` Steven Rostedt
2016-08-19 10:02     ` Stefan Hajnoczi
2016-08-18 16:19   ` Steven Rostedt
2016-08-21 12:32   ` Lluís Vilanova
2016-08-23 15:54     ` Stefan Hajnoczi
2016-08-23 15:54     ` Stefan Hajnoczi
2016-08-24 10:25       ` Lluís Vilanova
2016-08-29 13:45         ` Stefan Hajnoczi [this message]
2016-08-29 13:45           ` Stefan Hajnoczi
2016-08-29 18:46           ` [Qemu-devel] " Lluís Vilanova
2016-08-29 18:46           ` Lluís Vilanova
2016-08-31 16:35             ` Stefan Hajnoczi
2016-08-31 16:35             ` Stefan Hajnoczi
2016-09-05 14:37               ` Lluís Vilanova
2016-09-05 14:37               ` Lluís Vilanova
2016-09-05 19:20                 ` Masami Hiramatsu
2016-09-05 19:20                   ` Masami Hiramatsu
2016-09-06 12:59                   ` [Qemu-devel] " Lluís Vilanova
2016-09-06 12:59                   ` Lluís Vilanova
2016-09-13 13:52                 ` Stefan Hajnoczi
2016-09-13 13:52                   ` Stefan Hajnoczi
2016-09-13 16:50                   ` [Qemu-devel] " Lluís Vilanova
2016-09-13 16:50                   ` Lluís Vilanova
2016-09-05 14:59             ` Daniel P. Berrange
2016-09-05 14:59               ` Daniel P. Berrange
2016-09-05 18:29               ` [Qemu-devel] " Lluís Vilanova
2016-09-05 18:59                 ` Daniel P. Berrange
2016-09-06  8:54                   ` Lluís Vilanova
2016-09-06  8:54                   ` Lluís Vilanova
2016-09-05 18:59                 ` Daniel P. Berrange
2016-09-05 18:29               ` Lluís Vilanova
2016-08-24 10:25       ` Lluís Vilanova
2016-08-21 12:32   ` 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=20160829134502.GA26282@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=lcapitulino@redhat.com \
    --cc=lttng-dev@lists.lttng.org \
    --cc=mhiramat@kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rostedt@goodmis.org \
    --cc=stefanha@redhat.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.