qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: stefanha@linux.vnet.ibm.com,
	Harsh Bora <harsh@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, lttng-dev@lists.lttng.org,
	aneesh.kumar@linux.vnet.ibm.com, vilanova@ac.upc.edu
Subject: Re: [Qemu-devel] [lttng-dev] [RFC PATCH v2 0/4] simpletrace : support var num	of args and strings.
Date: Tue, 10 Jan 2012 12:29:05 -0500	[thread overview]
Message-ID: <20120110172905.GA15786@Krystal> (raw)
In-Reply-To: <CAJSP0QX61CxjymqB3JC1cfyb=da4k_G4Zfbabdr+1rgPjg7rQw@mail.gmail.com>

Hi Stefan,

* Stefan Hajnoczi (stefanha@gmail.com) wrote:
> On Tue, Jan 10, 2012 at 12:14 AM, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
> > This is needed to (very soon) add support for sdt.h in LTTng-UST 2.0, so
> > systemtap and gdb can hook into tracepoints declared by lttng-ust 2.0.
> 
> If lttng supports sdt.h in the future will it also provide a dtrace(1)
> wrapper?  I'm wondering if we can boil it down to the common DTrace
> code that we already use in QEMU for SystemTap and that the
> SmartOS/Illumos folks have used with DTrace.

What we plan to provide is the other way around: because we want to keep
the TRACEPOINT_EVENT description, which specify the mapping between the
arguments passed to the tracepoint() and what is to be serialized into
the trace, as part of the application code, we require that the
instrumentation be specified in the form of TRACEPOINT_EVENT and called
with tracepoint(). The bonus here is that the tracepoint() macro can
embed a STAP_PROBEV() call, which should be compatible with systemtap
and gdb.

Another point worth noting is that sdt provider uses a breakpoint to
call the probes from the application instrumentation sites, which brings
an added overhead compared to tracepoints when it is activated. This is
another reason for staying with tracepoints and not use SDT as is within
lttng-ust.

One more point is that tracepoints put all side-effects of the
parameters passed to the tracepoint() macro inside the "instrumentation
enabled" code path (pointer dereferenced, offsets computation, functions
called...). Therefore, when tracepoints are disabled, they just cost a
branch (which we plan to optimize to a no-op, as permitted by gcc asm
goto).

In theory, it might not be impossible to create a translator from a
subset of the dtrace language to TRACEPOINT_EVENT declarations. It is
just not on our roadmap at this point, and I'm not sure it's worth the
effort, when a simple script could translate from qemu-kvm trace-event
file to TRACEPOINT_EVENT declarations.

Thoughts ?

Best regards,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2012-01-10 17:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 15:46 [Qemu-devel] [RFC PATCH v2 0/4] simpletrace : support var num of args and strings Harsh Prateek Bora
2012-01-09 15:46 ` [Qemu-devel] [RFC PATCH v2 1/4] Converting tracetool.sh to tracetool.py Harsh Prateek Bora
2012-01-09 21:06   ` Andreas Färber
2012-01-10  6:12     ` Harsh Bora
2012-01-09 15:46 ` [Qemu-devel] [RFC PATCH v2 2/4] Makefile and configure changes for tracetool.py Harsh Prateek Bora
2012-01-09 15:46 ` [Qemu-devel] [RFC PATCH v2 3/4] simpletrace-v2: Handle variable number/size of elements per trace record Harsh Prateek Bora
2012-01-09 15:46 ` [Qemu-devel] [RFC PATCH v2 4/4] simpletrace.py: updated log reader script to handle new log format Harsh Prateek Bora
2012-01-09 16:01 ` [Qemu-devel] [RFC PATCH v2 0/4] simpletrace : support var num of args and strings Mathieu Desnoyers
2012-01-09 19:20   ` Harsh Bora
2012-01-10  0:14     ` Mathieu Desnoyers
2012-01-10  6:54       ` Harsh Bora
2012-01-10  7:17         ` [Qemu-devel] [lttng-dev] " Mathieu Desnoyers
2012-01-10  9:06           ` Harsh Bora
2012-01-10 10:44             ` Harsh Bora
2012-01-10 14:18               ` Mathieu Desnoyers
2012-01-10 14:58       ` Stefan Hajnoczi
2012-01-10 17:29         ` Mathieu Desnoyers [this message]
2012-01-11  9:30           ` Stefan Hajnoczi

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=20120110172905.GA15786@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=harsh@linux.vnet.ibm.com \
    --cc=lttng-dev@lists.lttng.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=vilanova@ac.upc.edu \
    /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).