public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Miell <nmiell@comcast.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mundt <lethal@linux-sh.org>,
	Karim Yaghmour <karim@opersys.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Jes Sorensen <jes@sgi.com>,
	Andrew Morton <akpm@osdl.org>,
	Roman Zippel <zippel@linux-m68k.org>,
	Tom Zanussi <zanussi@us.ibm.com>,
	Richard J Moore <richardj_moore@uk.ibm.com>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	Michel Dagenais <michel.dagenais@polymtl.ca>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Christoph Hellwig <hch@infradead.org>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	William Cohen <wcohen@redhat.com>,
	"Martin J. Bligh" <mbligh@mbligh.org>
Subject: Re: tracepoint maintainance models
Date: Sun, 17 Sep 2006 13:19:50 -0700	[thread overview]
Message-ID: <1158524390.2471.49.camel@entropy> (raw)
In-Reply-To: <20060917143623.GB15534@elte.hu>

On Sun, 2006-09-17 at 16:36 +0200, Ingo Molnar wrote:
> * Paul Mundt <lethal@linux-sh.org> wrote:
> 
> > What exactly are you trying to prove with this? Yes, people aren't 
> > opposed to a lightweight marker facility. Ingo made some suggestions 
> > regarding that, and others (Andrew, Martin, etc.) have pointed out 
> > that this would also be beneficial for certain use cases. I don't see 
> > anyone violently opposed to lightweight markers, I see people 
> > violently opposed to the ltt-centric breed of static instrumentation 
> > (and yes, I'm one of them), let's not confuse the two.
> 
> yes. The way i see this whole issue (and what i've been trying argue for 
> a long time) is that with dynamic tracers we have a _continuum_ of 
> _tracepoint maintainance models_ that maintainers can choose from, each 
> of which model gives the same "end-user experience":

To inject some facts into this argument, I took a look at dtrace on a
Solaris LiveCD (Belenix 0.4.4, actually, and wow are their userspace
apps are as terrible as I've been lead to be believe.)

On my system, Solaris has 49 "real" static probes (with actual
documentation[1]). They are as follows:

io:::done                           proc:::lwp-start
io:::start                          proc:::signal-clear
io:::wait-done                      proc:::signal-discard
io:::wait-start                     proc:::signal-handle
lockstat:::adaptive-acquire         proc:::signal-send
lockstat:::adaptive-block           proc:::start
lockstat:::adaptive-release         sched:::change-pri
lockstat:::adaptive-spin            sched:::dequeue
lockstat:::rw-acquire               sched:::enqueue
lockstat:::rw-block                 sched:::off-cpu
lockstat:::rw-downgrade             sched:::on-cpu
lockstat:::rw-release               sched:::preempt
lockstat:::rw-upgrade               sched:::remain-cpu
lockstat:::spin-acquire             sched:::schedctl-nopreempt
lockstat:::spin-release             sched:::schedctl-preempt
lockstat:::spin-spin                sched:::schedctl-yield
lockstat:::thread-spin              sched:::sleep
proc:::create                       sched:::surrender
proc:::exec                         sched:::tick
proc:::exec-failure                 sched:::wakeup
proc:::exec-success                 sdt:::callout-end
proc:::exit                         sdt:::callout-start
proc:::fault                        sdt:::interrupt-complete
proc:::lwp-create                   sdt:::interrupt-start
proc:::lwp-exit

You'll note that these probes are all generic high-level concepts, some
of which occur at multiple places within the kernel (You can just trust
me on this, the dtrace -l output lists multiple function sites for the
provider:::name pair).

In addition to those 49 probes, there are 330 more documented probes
which fire whenever a statistical counter changes (most of them are SNMP
MIB counters, but there are also probes related to VM behavior,
filesystem activity, etc.). These are all hidden inside the pre-existing
counter update macros[2] and didn't increase the kernel maintenance
burden because the counters already had to be maintained (which is why I
don't consider them "real").

There are also 134 more undocumented driver-specific probes. Every probe
comes labeled with a stability indicator that looks like something like
this:

 8271        sdt               zfs         arc_evict_ghost arc-delete

        Probe Description Attributes
                Identifier Names: Private
                Data Semantics:   Private
                Dependency Class: Unknown

        Argument Attributes
                Identifier Names: Private
                Data Semantics:   Private
                Dependency Class: ISA

        Argument Types
                None

Which basically says that this undocumented probe is for private Sun use
and if you touch it and something breaks, you were warned and it's your
own damn fault[3]. (Obviously, the stable probes have different
labeling.) Also, given a D script, the dtrace command can spit out a
summary of that script's stability based on the probes it uses, which is
handy for judging the future compatibility of a script.

So, Solaris has a grand total of 513 statically defined probe points,
most of them hidden inside macros that were already there.

Then why is dtrace useful?

Because there's 48288 dynamically defined probes on function entry and
exit and another 454 dynamic syscall entry and exit probes.

This is the important part: In a dynamic tracing system, the number of
static probes necessary for the tracing system to be useful is
drastically, dramatically, absurdly lower than in a purely static
tracing system. Hell, you don't even need the static probes for it to be
useful, they're just a convenience for events which happen in multiple
places or a high-level name for a low-level implementation detail.

In order for the static tracing system to be as useful as the dynamic
system, all of those dynamically generated probe points would have to be
manually added to the kernel. The maintenance burden of this number of
probes is stupidly high. In reality, no static system would ever reach
that level of coverage.




[1] http://docs.sun.com/app/docs/doc/817-6223
[2] http://blogs.sun.com/tpenta/entry/dtrace_using_placing_sdt_probes
[3] http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view

-- 
Nicholas Miell <nmiell@comcast.net>


  parent reply	other threads:[~2006-09-17 20:21 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-17  9:40 The emperor is naked: why *comprehensive* static markup belongs in mainline Karim Yaghmour
2006-09-17 11:21 ` Paul Mundt
2006-09-17 14:36   ` tracepoint maintainance models Ingo Molnar
2006-09-17 15:02     ` Roman Zippel
2006-09-17 15:09       ` Ingo Molnar
2006-09-17 17:18         ` Roman Zippel
2006-09-17 23:27           ` Ingo Molnar
2006-09-17 23:41           ` Ingo Molnar
2006-09-18  0:17             ` Roman Zippel
2006-09-18  9:01               ` Jes Sorensen
2006-09-17 20:37         ` Roman Zippel
2006-09-17 22:34           ` Ingo Molnar
2006-09-17 15:36     ` Mathieu Desnoyers
2006-09-18  0:07       ` Ingo Molnar
2006-09-18  1:12         ` Karim Yaghmour
2006-09-18  1:13           ` Ingo Molnar
2006-09-18  2:32             ` Karim Yaghmour
2006-09-18  2:57               ` Ingo Molnar
2006-09-18  3:54                 ` Karim Yaghmour
2006-09-18  4:09                   ` Ingo Molnar
2006-09-18  4:43                     ` Karim Yaghmour
2006-09-18  2:43             ` Mathieu Desnoyers
2006-09-18  3:21               ` Ingo Molnar
2006-09-18  4:26                 ` Mathieu Desnoyers
2006-09-18  5:08                   ` Ingo Molnar
2006-09-18 12:25             ` Frank Ch. Eigler
2006-09-18 15:02               ` Ingo Molnar
2006-09-18 15:45                 ` Mathieu Desnoyers
2006-09-18 15:48                 ` Alan Cox
2006-09-18 15:22                   ` Ingo Molnar
2006-09-18 16:19                     ` Alan Cox
2006-09-18 16:15                       ` Ingo Molnar
2006-09-18 17:02                         ` Alan Cox
2006-09-18 16:15                       ` Frank Ch. Eigler
2006-09-18 17:02                         ` Alan Cox
2006-09-18 17:27                           ` Frank Ch. Eigler
2006-09-18 18:04                             ` Alan Cox
2006-09-18 17:54                               ` Martin Bligh
2006-09-18 18:05                               ` Frank Ch. Eigler
2006-09-18 19:10                           ` Vara Prasad
2006-09-18 19:49                             ` Alan Cox
2006-09-18 19:39                               ` Frank Ch. Eigler
2006-09-18 20:28                               ` Vara Prasad
2006-10-06  5:33                                 ` Steven Rostedt
2006-10-06 13:01                                   ` Frank Ch. Eigler
2006-10-06 14:23                                     ` Steven Rostedt
2006-10-06 23:17                                   ` Jeremy Fitzhardinge
2006-09-18 15:47                   ` Frank Ch. Eigler
2006-09-18 15:42                     ` Ingo Molnar
2006-09-18 16:30                 ` MARKER mechanism, try 2 Mathieu Desnoyers
2006-09-18 16:28                   ` Ingo Molnar
2006-09-18 17:47                     ` Mathieu Desnoyers
2006-09-18 19:39                       ` Alan Cox
2006-09-17 20:19     ` Nicholas Miell [this message]
2006-09-17 23:06       ` tracepoint maintainance models Ingo Molnar
2006-09-18  0:05         ` Roman Zippel
2006-09-18  1:52           ` Theodore Tso
2006-09-19 12:58           ` tracing - consensus building insteat of dogfights Christoph Hellwig
2006-09-19 13:25             ` Roman Zippel
2006-09-19 13:45             ` Karim Yaghmour
2006-09-19 14:25               ` Karim Yaghmour
2006-09-18  0:10         ` tracepoint maintainance models Nicholas Miell
2006-09-18  0:43           ` Roman Zippel
2006-09-18  0:56         ` Karim Yaghmour
2006-09-18  0:56           ` Ingo Molnar
2006-09-18  2:09             ` Karim Yaghmour
2006-09-18  3:30               ` Ingo Molnar
2006-09-18  3:52                 ` Theodore Tso
2006-09-18  4:11                   ` Ingo Molnar
2006-09-18  4:24                   ` Karim Yaghmour
2006-09-18  4:32                     ` Ingo Molnar
2006-09-18  5:03                       ` LTTng and SystemTAP (Everyone who is scared to read this huge thread, skip to here) Mathieu Desnoyers
2006-09-18 15:11                         ` Ingo Molnar
2006-09-23 15:50                           ` Mathieu Desnoyers
2006-09-18  5:37                       ` tracepoint maintainance models Karim Yaghmour
2006-09-18 20:12                   ` Michel Dagenais
2006-09-18  4:14                 ` Karim Yaghmour
2006-09-18  4:09                   ` Ingo Molnar
2006-09-18  4:57                     ` Karim Yaghmour
2006-09-18  1:03   ` The emperor is naked: why *comprehensive* static markup belongs in mainline Karim Yaghmour
2006-09-18 15:53 ` Jose R. Santos
2006-09-18 17:28   ` Karim Yaghmour

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=1158524390.2471.49.camel@entropy \
    --to=nmiell@comcast.net \
    --cc=akpm@osdl.org \
    --cc=fche@redhat.com \
    --cc=gregkh@suse.de \
    --cc=hch@infradead.org \
    --cc=jes@sgi.com \
    --cc=karim@opersys.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mbligh@mbligh.org \
    --cc=michel.dagenais@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=richardj_moore@uk.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=wcohen@redhat.com \
    --cc=zanussi@us.ibm.com \
    --cc=zippel@linux-m68k.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