From: Charles Manning <manningc2@actrix.gen.nz>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 3/8] Add yaffs2 file system: guts code
Date: Tue, 7 Dec 2010 17:12:12 +1300 [thread overview]
Message-ID: <201012071712.12772.manningc2@actrix.gen.nz> (raw)
In-Reply-To: <1291682864.16223.37.camel@gandalf.stny.rr.com>
On Tuesday 07 December 2010 13:47:43 Steven Rostedt wrote:
> On Tue, 2010-12-07 at 00:03 +0100, Arnd Bergmann wrote:
> > > > > yaffs_trace(YAFFS_TRACE_BUFFERS,
> > > > > "Out of temp buffers at line %d, other held by lines:",line_no);
> > > > > for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++)
> > > > > yaffs_trace(YAFFS_TRACE_BUFFERS," %d ", dev->temp_buffer[i].line);
> > > > > yaffs_trace(YAFFS_TRACE_BUFFERS, "\n");
> > > > >
> > > > > Would that be OK?
> > > > >
> > > > > I am loath to have to pull out useful code then plug it back in
> > > > > again.
> > > >
> > > > I don't think the yaffs_trace() function would be much better than
> > > > the T() macro, I was talking more about the fact that you have your
> > > > own nonstandard tracing infrastructure than the ugliness of the
> > > > interface.
> > > >
> > > > The point of pulling it out now would be force you to rethink the
> > > > tracing. If you think that you'd arrive at the same conclusion, just
> > > > save the diff between the code with and without tracing so you can
> > > > submit that patch again later.
> > > >
> > > > Having some sort of tracing is clearly useful, but it's also not
> > > > essential for the basic yaffs2 operation. We want to keep a
> > > > consistent way of presenting trace points across the kernel, so as
> > > > long as you do it differently, your code is going to be viewed with
> > > > some suspicion.
> > > >
> > > > Please have a look at how ext4, gfs2 and xfs do tracing.
> > >
> > > Looking in Linus' tree, all of those contain custom tracing of the form
> > > I propose.
> >
> > Hmm, yes I guess that's right...
> >
> > I was specifically talking about the include/trace/* based trace events
> > as something to look at, not the random printk based tracing stuff.
> > Maybe Steven or Frederic can give some more insight on that.
>
> What are all those T() functions? Some look like they should be replaced
> with printk(KERN_* "") functions, some others for tracing (I guess the
> ones with YAFFS_TRACE_TRACING).
Yes those are very ugly. That is why I proposed changing them to
yaffs_trace(bit, "format", args).
That gives printk tracing which I can select on the fly by enabling the
selected bits in the bitmask. eg. If I want to see the OS calls and the mtd
accesses then I enable YAFFS_TRACE_MTD and YAFFS_TRACE_OS and only those
grace groups get spat out.
People find this very handy, especially during system integration, so I am
loath to lose it. It is simple and it works.
Will it not be acceptable to just leave in the printk-style messages and
perhaps addTRACE_EVENT later?
>
> ext4, gfs and xfs all have converted to the TRACE_EVENT() methods. When
> you have this, you get tracing for free. The work with both ftrace and
> perf. You can look at the samples/trace_events/ code for examples.
>
> Note, if you use TRACE_EVENT() and you want to debug even more, you can
> simply add trace_printk() and that will also appear in your tracing
> output.
>From what I see, ext4 uses both trace_event and wrapped printk tracing, some
right alongside eachother so it is a duplication - not a replacement.
YAFFS has approx 500 trace lines in it. Some of those would make sense to
attach to TRACE_EVENT() , but most not. trace/events/ext4.h has 1172 lines
for around 28 events (== 40-odd lines per event).
Still reading everything I can find on this (inc, your LWN articles) to get
an understanding of what capabilities these give me and what heuristic should
be used to define trace points vs printks.
-- Charles
next prev parent reply other threads:[~2010-12-07 4:12 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 21:57 [PATCH 0/8] Add yaffs2 file system: Third patchset Charles Manning
2010-11-30 21:57 ` [PATCH 1/8] Add yaffs2 file system: allocator, attribs, bitmap code Charles Manning
2010-12-02 18:14 ` Marcin Slusarz
2010-12-02 19:20 ` Charles Manning
2010-12-02 19:49 ` Ryan Mallon
2010-12-02 20:48 ` kevin granade
2010-11-30 21:57 ` [PATCH 2/8] Add yaffs2 file system: checkpoint and ecc code Charles Manning
2010-12-05 21:55 ` Jesper Juhl
2010-11-30 21:57 ` [PATCH 3/8] Add yaffs2 file system: guts code Charles Manning
2010-11-30 22:23 ` Arnd Bergmann
2010-12-06 1:50 ` Charles Manning
2010-12-06 12:55 ` Arnd Bergmann
2010-12-06 22:13 ` Charles Manning
2010-12-06 22:16 ` Jesper Juhl
2010-12-06 23:03 ` Arnd Bergmann
2010-12-07 0:47 ` Steven Rostedt
2010-12-07 4:12 ` Charles Manning [this message]
2010-12-07 14:49 ` Steven Rostedt
2010-12-07 20:43 ` Charles Manning
2010-12-07 22:49 ` Steven Rostedt
2010-11-30 21:57 ` [PATCH 4/8] Add yaffs2 file system: tags handling code Charles Manning
2010-12-05 22:12 ` Jesper Juhl
2010-11-30 21:57 ` [PATCH 5/8] Add yaffs2 file system: mtd and flash " Charles Manning
2010-12-05 22:42 ` Jesper Juhl
2010-11-30 21:57 ` [PATCH 6/8] Add yaffs2 file system: xattrib code Charles Manning
2010-12-05 22:20 ` Jesper Juhl
2010-11-30 21:57 ` [PATCH 7/8] Add yaffs2 file system: verification code and other headers Charles Manning
2010-12-02 20:00 ` Ryan Mallon
2010-12-05 21:20 ` Charles Manning
2010-12-05 21:45 ` Ryan Mallon
2010-12-05 22:50 ` Charles Manning
2010-12-07 15:06 ` Pekka Enberg
2010-11-30 21:57 ` [PATCH 8/8] Add yaffs2 file system: VFS glue code, hook into kernel tree building Charles Manning
2010-12-01 5:30 ` Nick Piggin
2010-12-02 20:35 ` Ryan Mallon
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=201012071712.12772.manningc2@actrix.gen.nz \
--to=manningc2@actrix.gen.nz \
--cc=arnd@arndb.de \
--cc=fweisbec@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome