public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch 06/16] Markers auto enable tracepoints (new API : trace_mark_tp())
Date: Tue, 18 Nov 2008 17:30:37 +0100	[thread overview]
Message-ID: <20081118163037.GD8088@elte.hu> (raw)
In-Reply-To: <20081118044403.GA32759@Krystal>


* Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:

> Markers identify the name (and therefore numeric ID) to attach to an 
> "event" and the data types to export into trace buffers for this 
> specific event type. These data types are fully expressed in a 
> marker format-string table recorded in a "metadata" channel. The 
> size of the various basic types and the endianness is recorded in 
> the buffer header. Therefore, the binary trace buffers are 
> self-described.
> 
> Data is exported through binary trace buffers out of kernel-space, 
> either by writing directly to disk, sending data over the network, 
> crash dump extraction, etc.

Streaming gigabytes of data is really mostly only done when we know 
_nothing_ useful about a failure mode and are _forced_ into logging 
gobs and gobs of data at great expense.

And thus in reality this is a rather uninteresting usecase.

We do recognize and support it as it's a valid "last line of defense" 
for system and application failure analysis, but we should also put it 
all into proper perspective: it's the rare and abnormal exception, not 
the design target.

Note that we support this mode of tracing today already: we can 
already stream binary data via the ftrace channel - the ring buffer 
gives the infrastructure for that. Just do:

  # echo bin > /debug/tracing/trace_options

... and you'll get the trace data streamed to user-space in an 
efficient, raw, binary data format!

This works here and today - and if you'd like it to become more 
efficient within the ftrace framework, we are all for it. (It's 
obviously not the default mode of output, because humans prefer ASCII 
and scriptable output formats by a _wide_ margin.)

Almost by definition anything opaque and binary-only that goes from 
the kernel to user-space has fundamental limitations: it just doesnt 
actively interact with the kernel for us to be able to form a useful 
and flexible filter of information around it.

The _real_ solution to tracing in 99% of the cases is to intelligently 
limit information - it's not like the user will read and parse 
gigabytes of data ...

Look at the myriads of rather useful ftrace plugins we have already 
and that sprung out of nothing. Compare it to the _10 years_ of 
inaction that more static tracing concepts created. Those plugins work 
and spread because it all lives and breathes within the kernel, and 
almost none of that could be achieved via the 'stream binary data to 
user-space' model you are concentrating on.

So in the conceptual space i can see little use for markers in the 
kernel that are not tracepoints (i.e. not actively used by a real 
tracer). We had markers in the scheduler initially, then we moved to 
tracepoints - and tracepoints are much nicer.

[ And you wrote both markers and tracepoints, so it's not like i risk
  degenerating this discussion into a flamewar by advocating one of 
  your solutions over the other one ;-) ]

... and in that sense i'd love to see lttng become a "super ftrace 
plugin", and be merged upstream ASAP.

We could even split it up into multiple bits as its merged: for 
example syscall tracing would be a nice touch that a couple of other 
plugins would adapt as well. But every tracepoint should have some 
active role and active connection to a tracer.

And we'd keep all those tracepoints open for external kprobes use as 
well - for the dynamic tracers, as a low-cost courtesy. (no long-term 
API guarantees though.)

Hm?

	Ingo

  reply	other threads:[~2008-11-18 16:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-14 22:47 [patch 00/16] Markers and Tracepoints Updates for -tip Mathieu Desnoyers
2008-11-14 22:47 ` [patch 01/16] RCU read sched notrace Mathieu Desnoyers
2008-11-16  4:00   ` Paul E. McKenney
2008-11-14 22:47 ` [patch 02/16] Marker fix unregister Mathieu Desnoyers
2008-11-14 22:47 ` [patch 03/16] markers: Add missing stdargs.h include, needed due to va_list usage Mathieu Desnoyers
2008-11-14 22:47 ` [patch 04/16] Markers use rcu_*_sched_notrace and notrace Mathieu Desnoyers
2008-11-14 22:47 ` [patch 05/16] Markers use module notifier Mathieu Desnoyers
2008-11-16  8:52   ` [PATCH] markers/tracpoints: fix non-modular build Ingo Molnar
2008-11-17  5:39     ` Mathieu Desnoyers
2008-11-14 22:47 ` [patch 06/16] Markers auto enable tracepoints (new API : trace_mark_tp()) Mathieu Desnoyers
2008-11-16  7:59   ` Ingo Molnar
2008-11-18  4:44     ` Mathieu Desnoyers
2008-11-18 16:30       ` Ingo Molnar [this message]
2008-11-23 16:40         ` Mathieu Desnoyers
2008-11-23 16:49           ` Ingo Molnar
2008-11-24  8:05             ` Mathieu Desnoyers
2008-11-25 12:23     ` KOSAKI Motohiro
2008-11-25 17:24       ` Frank Ch. Eigler
2008-11-14 22:47 ` [patch 07/16] Markers : create DEFINE_MARKER and GET_MARKER (new API) Mathieu Desnoyers
2008-11-14 22:47 ` [patch 08/16] Tracepoints : Samples fix teardown Mathieu Desnoyers
2008-11-14 22:47 ` [patch 09/16] Tracepoint fix disable Mathieu Desnoyers
2008-11-14 22:47 ` [patch 10/16] Tracepoints use rcu_*_sched_notrace Mathieu Desnoyers
2008-11-14 22:47 ` [patch 11/16] Tracepoint Use Unregister Return Value Mathieu Desnoyers
2008-11-14 22:47 ` [patch 12/16] Tracepoint do not put arguments in name Mathieu Desnoyers
2008-11-14 22:47 ` [patch 13/16] Tracepoints : use modules notifiers Mathieu Desnoyers
2008-11-14 22:47 ` [patch 14/16] Tracepoints : add DECLARE_TRACE() and DEFINE_TRACE() Mathieu Desnoyers
2008-11-14 22:47 ` [patch 15/16] Tracepoints : documentation fix teardown Mathieu Desnoyers
2008-11-14 22:47 ` [patch 16/16] marker_synchronize_unregister->tracepoint_synchronize_unregister Mathieu Desnoyers
2008-11-16  7:48   ` Ingo Molnar
2008-11-17  5:36     ` Mathieu Desnoyers

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=20081118163037.GD8088@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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