Re: [PATCH 3/8] Add yaffs2 file system: guts code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Tuesday, December 7, 2010 - 7:49 am

[ Adding Ted to Cc ]

On Tue, 2010-12-07 at 17:12 +1300, Charles Manning wrote:

Adding the TRACE_EVENT() code is also simple too ;)

With TRACE_EVENT() you will get the advantage of jump_lables (with newer
compilers). That is, there's no "if (bit & SOME_MASK) trace();" logic. A
nop is placed in the code and no compares are needed. When tracing is
enabled, the nop is changed to a jmp to the trace.

If you still use your own tracer, you could still use the internal
ring_buffer code.


Printks go to the console. You should not do that unless it is an error
that the admin should notice. There's also levels of printks that you
can do:

KERN_ERR, KERN_WARING, KERN_INFO, KERN_DEBUG, etc.

But again, these go to the users console and into the message logs. If
it is something that is a high activity this can slow down the system as
printk's are synchronous. That is, they don't continue work until they
finished writing. If you have a serial console, that could really slow
things down.

printk's should not be used for real debugging anyway. But putting it
into a tracepoint, then it opens up lots of options.

Your T(YAFFS_TRACE_ALWAYS, ...) look like good candidates for printks.

TRACE_EVENTS() are those that just want to analyze what is happening in
the system.

-- Steve
 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/8] Add yaffs2 file system: Third patchset, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 2/8] Add yaffs2 file system: checkpoint and ecc code, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 4/8] Add yaffs2 file system: tags handling code, Charles Manning, (Tue Nov 30, 2:57 pm)
[PATCH 6/8] Add yaffs2 file system: xattrib code, Charles Manning, (Tue Nov 30, 2:57 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Arnd Bergmann, (Tue Nov 30, 3:23 pm)
Re: [PATCH 6/8] Add yaffs2 file system: xattrib code, Jesper Juhl, (Sun Dec 5, 3:20 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Arnd Bergmann, (Mon Dec 6, 5:55 am)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Mon Dec 6, 3:13 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Jesper Juhl, (Mon Dec 6, 3:16 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Arnd Bergmann, (Mon Dec 6, 4:03 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Steven Rostedt, (Mon Dec 6, 5:47 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Mon Dec 6, 9:12 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Steven Rostedt, (Tue Dec 7, 7:49 am)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Charles Manning, (Tue Dec 7, 1:43 pm)
Re: [PATCH 3/8] Add yaffs2 file system: guts code, Steven Rostedt, (Tue Dec 7, 3:49 pm)