public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@us.ibm.com>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: linux-kernel@vger.kernel.org, adobriyan@gmail.com,
	dwilder@us.ibm.com, hunt@redhat.com
Subject: Re: [RFC PATCH 1/3] Generic Trace Setup and Control (GTSC) Documentation
Date: Thu, 05 Jul 2007 11:05:19 -0500	[thread overview]
Message-ID: <1183651519.4517.167.camel@ubuntu> (raw)
In-Reply-To: <20070704033738.GC24341@Krystal>

On Tue, 2007-07-03 at 23:37 -0400, Mathieu Desnoyers wrote:
> * Tom Zanussi (zanussi@us.ibm.com) wrote:
> > This is the documentation for the Generic Trace Setup and Control
> > patchset, first submitted a couple of weeks ago.  See
> > 
> > http://marc.info/?l=linux-kernel&m=118214274912586&w=2
> > 
> > for a more detailed description.
> > 
> > I've updated this patch to incorporate the suggestions made by Alexey
> > Dobriyan in that thread.
> > 
> 
> It would be nice, since it claims to be "generic", to support things
> brought forward by other tracers like LTTng, such as : multiple channels
> (for low, medium and high event rate data, with user-selectable sizes),
> hybrid trace mode (combined normal trace channels and flight recorder
> channels).
> 

Those seem like useful things, but it would also be nice for LTTng to
support things brought forward by other tracers too.

GTSC comes from something I posted last year called 'UTT', for 'Unified
Trace Transport':

http://www.ecos.sourceware.org/ml/systemtap/2006-q4/msg00026.html

I wasn't comfortable with the word 'Unified' then, either, since I
thought it was presumptuous (so 'unified' was dropped, and 'generic'
used instead - basically it just means that any tracing application can
use it, not that it attempts to subsume all other tracers).

The idea was to see if the blktrace code could be generalized so that it
could be used for other tracing applications besides block layer
tracing.  The test case was to get systemtap running on top of the
blktrace transport, and it seemed to work fine.  As part of that patch
set, I also posted a couple patches that did the same thing but on top
of LTTng, which also worked fine:

http://www.ecos.sourceware.org/ml/systemtap/2006-q4/msg00028.html
http://www.ecos.sourceware.org/ml/systemtap/2006-q4/msg00027.html

But I never got any comments about it, so I assumed it wasn't something
you were interested in.  In any case, do you really think everyone who
wants to do tracing should wait around for LTTng to get into the kernel
lock, stock, and barrel?  It's been awhile since I did this experiment,
but do you think LTTng is ready today to function as the transport for
systemtap?  How hard do you think it would it be to modify blktrace to
run on top of the the LTTng tracing infrastructure?  My guess is that if
the answers were 'yes' and 'not hard', then LTTng could basically 'own'
tracing and the rest of us could move on to more interesting things.

> Please see comments below,
> 
> > +
> > +void gtsc_printf(struct trace_info *trace, const char *format, ...)
> > +{
> > +	va_list args;
> > +	void *buf;
> > +	int len;
> > +	char *record;
> > +
> > +	if (!trace)
> > +		return;
> > +	if (!trace_running(trace))
> > +		return;
> > +
> > +	/* get a timestamp */
> > +	buf = gtsc_printf_tmpbuf[smp_processor_id()];
> > +	len = sprintf(buf,"[%lld] ", trace_timestamp());
> > +
> > +	/* get the data */
> > +	va_start(args, format);
> > +	len += vsnprintf(buf+len, GTSC_PRINTF_TMPBUF_SIZE, format, args);
> > +	va_end(args);
> > +
> > +	/*
> > +	 * Locking can be eliminated by specifying per-cpu buffers
> > +	 * when calling trace_setup().
> > +	 */
> > +	spin_lock(&gtsc_printf_lock);
> > +
> 
> I really hope nobody is willing to call gtsc_printf from an interrupt
> handler.. :) Easy dead embrace in perspective.
> 

This is just example code in the documentation.  There is no actual
gtsc_printf() in the code.

Tom




      reply	other threads:[~2007-07-05 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-30  3:24 [RFC PATCH 1/3] Generic Trace Setup and Control (GTSC) Documentation Tom Zanussi
2007-07-04  3:37 ` Mathieu Desnoyers
2007-07-05 16:05   ` Tom Zanussi [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=1183651519.4517.167.camel@ubuntu \
    --to=zanussi@us.ibm.com \
    --cc=adobriyan@gmail.com \
    --cc=compudj@krystal.dyndns.org \
    --cc=dwilder@us.ibm.com \
    --cc=hunt@redhat.com \
    --cc=linux-kernel@vger.kernel.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