All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>, Ingo Molnar <mingo@elte.hu>,
	Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/5] ftrace: infrastructure for supporting binary record
Date: Tue, 20 Jan 2009 00:29:56 +0100	[thread overview]
Message-ID: <20090119232956.GD6194@nowhere> (raw)
In-Reply-To: <20090119213720.GF690@ghostprotocols.net>

On Mon, Jan 19, 2009 at 07:37:21PM -0200, Arnaldo Carvalho de Melo wrote:
> Em Mon, Jan 19, 2009 at 10:08:40PM +0100, Frederic Weisbecker escreveu:
> > On Mon, Jan 19, 2009 at 06:25:23PM -0200, Arnaldo Carvalho de Melo wrote:
> > > Em Mon, Jan 19, 2009 at 08:28:03PM +0100, Frédéric Weisbecker escreveu:
> > > > 2009/1/2 Arnaldo Carvalho de Melo <acme@ghostprotocols.net>:
> > > > >
> > > > > warning: I haven't looked at the patch details
> > > > >
> > > > > But I would love to use something like this to provide the exact
> > > > > contents the userspace blktrace utilities want.
> > > > >
> > > > > - Arnaldo
> > > > >
> > > > 
> > > > 
> > > > Hi Arnaldo,
> > >  
> > > > Since you talked about binary record for the blk tracer, I just recall
> > > > this patch.  Are you sure this infrastructure would cover your needs?
> > > 
> > > Nope, now that I look at it it definetely isn't what I need. See? the
> > > warning was valid after all :-)
> > > 
> > > What I want and will experiment now is to almost dump the contents of
> > > the ring buffer as-is to userspace. I want that so that I can use
> > > blkparse to validate the ring buffer + blkFtrace routines produced
> > > buffer.
> > > 
> > > So probably it will be a matter of using trace_iter to signal that, and
> > > when it gets to my print_line routine I just put together the initial
> > > trace format expected by blkparse + the ones I'm collecting at
> > > tracepoint time.
> > 
> > 
> > So you would like two different trace files? Or print both bin and formatted
> > output together in the same file?
> > I'm not sure I understand :-s
> 
> output depends on iter_flags, most of what is needed is there, but I
> guess there are too many ways to achieve the same result and some
> keywords that are already used for other purposes, such as
> TRACE_ITER_BIN -> print_bin_fmt that forces all traces to first have
> pid, cpu and timestamp (all using trace_seq_putmem), then whatever the
> tracer wants to put after that (if it registered a tracer_event _and_ it
> has a ->binary() emitter), when I wanted it to just call ->binary(),
> where I would emulate exactly the old blktrace format, then we would be
> able to just ask for binary traces, collect them thru
> /d/tracing/trace_pipe and pipe them into blkparse for
> validation/debugging the ring_buffer + ftrace + blkFtrace code.


Oh I see. I think it just needs a new flag in struct trace_event to tell
if we want the headers or not.
And then check this flag in trace.c to decide if we print the cpu/time/pid
or let the tracer do all its job.

I will submit a patch in the next days to bring it.

 
> I'll try to get a brain dump in the form of working code later
> today/early tomorrow, now I'm being preempted by my wife to do those
> social things like having dinner and going to the movie theater 8)


Heh, have a good evening! :-)


> Regards,
> 
> - Arnaldo


  reply	other threads:[~2009-01-19 23:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31  2:56 [PATCH 2/5] ftrace: infrastructure for supporting binary record Lai Jiangshan
2008-12-31  4:59 ` Frederic Weisbecker
2009-01-02 22:24   ` Arnaldo Carvalho de Melo
2009-01-05  2:06     ` Lai Jiangshan
2009-01-06 11:32       ` Frédéric Weisbecker
2009-01-19 19:28     ` Frédéric Weisbecker
2009-01-19 20:25       ` Arnaldo Carvalho de Melo
2009-01-19 21:08         ` Frederic Weisbecker
2009-01-19 21:37           ` Arnaldo Carvalho de Melo
2009-01-19 23:29             ` Frederic Weisbecker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-28  9:13 [PATCH][RFC] vsprintf: unify the format decoding layer for its 3 users Ingo Molnar
2009-02-28 20:16 ` [PATCH 2/5] ftrace: infrastructure for supporting binary record Frederic Weisbecker
2009-03-02 16:27   ` Steven Rostedt
2009-03-02 17:39     ` Frédéric Weisbecker

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=20090119232956.GD6194@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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 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.