linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC|PATCHv2] Compile time printk verbosity
@ 2009-09-02 14:25 Marc Andre Tanner
  2009-09-02 14:25 ` [PATCH 1/5] printk: introduce CONFIG_PRINTK_VERBOSITY Marc Andre Tanner
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Marc Andre Tanner @ 2009-09-02 14:25 UTC (permalink / raw)
  To: linux-embedded; +Cc: mat

This series adds a configuration option to selectively compile out
printk message strings based on a verbosity level.

This works by wrapping printk with a macro which evaluates to a 
constant if condition which the compiler will be able to optimize 
out.

For situation were this filtering mechanism is not desired an 
unfiltered variant is introduced: printk_unfiltered.

Currently the unfiltered variant is only used within
drivers/char/mem.c because we don't want to filter user space
data which comes is sent to /dev/kmsg.

Are there other places where the unfiltered variant should be used?

A known problem is that KERN_CONT messages aren't handled correctly.

The series was compile tested with make allyesconfig for x86 and 
arm (with a cross compiler) but I might have missed something.

Thanks to Mike Frysinger and Jamie Lokier for their suggestions for
improvement. 

All kinds of comments are welcome.

Marc Andre Tanner (5):
      printk: introduce CONFIG_PRINTK_VERBOSITY
      printk: move printk to the end of the file
      printk: introduce printk_unfiltered as an alias to printk
      char/mem: replace printk with printk_unfiltered
      printk: provide a filtering macro for printk

 drivers/char/mem.c     |    2 +-
 include/linux/kernel.h |   28 ++++++++++++++
 init/Kconfig           |   28 ++++++++++++++
 kernel/printk.c        |   95 ++++++++++++++++++++++++++++++------------------
 4 files changed, 117 insertions(+), 36 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-09-03  6:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-02 14:25 [RFC|PATCHv2] Compile time printk verbosity Marc Andre Tanner
2009-09-02 14:25 ` [PATCH 1/5] printk: introduce CONFIG_PRINTK_VERBOSITY Marc Andre Tanner
2009-09-02 16:44   ` Marco Stornelli
2009-09-02 17:32     ` Marc Andre Tanner
2009-09-02 14:25 ` [PATCH 2/5] printk: move printk to the end of the file Marc Andre Tanner
2009-09-02 14:25 ` [PATCH 3/5] printk: introduce printk_unfiltered as an alias to printk Marc Andre Tanner
2009-09-02 14:25 ` [PATCH 4/5] char/mem: replace printk with printk_unfiltered Marc Andre Tanner
2009-09-02 14:25 ` [PATCH 5/5] printk: provide a filtering macro for printk Marc Andre Tanner
2009-09-02 16:44   ` Marco Stornelli
2009-09-02 17:27     ` Marc Andre Tanner
2009-09-03  6:29       ` Marco Stornelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).