login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
21
Re: [patch 1/3] dynamic_printk: core
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Randy Dunlap
Subject:
Re: [patch 1/3] dynamic_printk: core
Date: Wednesday, May 21, 2008 - 1:35 pm
On Tue, 29 Apr 2008 14:41:43 -0400 Jason Baron wrote:
quoted text
> > Add the ability to dynamically enable/disable pr_debug()/dev_dbg() in the > kernel. Yes, these calls could be converted to printk(KERN_DEBUG), but there > are enough to cause overhead. Additionally, the logs become difficult to read. > Here, one can turn these messages on/off per module via: > > echo "add module_name" > <debugfs>/dynamic_printk/modules > echo "remove module_name" > <debugfs>/dynamic_printk/modules > > There is also a special 'all' value that turns on all the debugging messages. > ---
quoted text
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 623ef24..63e5229 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -632,6 +632,46 @@ config FIREWIRE_OHCI_REMOTE_DMA > > If unsure, say N. > > +config DYNAMIC_PRINTK > + bool "Enable dynamic printk() call support" > + default n > + depends on PRINTK
and depends on DEBUG_FS ?? We shouldn't advertise this option unless the kernel can actually enable those pr_debug/dev_dbg calls...
quoted text
> + help > + > + Allows pr_debug() and dev_dbg() calls to be dynamically enabled based > + upon their source module. Traditionally, these calls are only > + enabled if one set #define DEBUG and recompiled the kernel. This > + option obviates time consuming re-compiles. > + > + The impact of this compile option is a larger kerenl text size ~1%. > + However, if CONFIG_IMMEDIATE is set, the run-time impact is > + negligible. Without CONFIG_IMMEDIATE set, a global variable is > + referenced for each pr_debug() and dev_dbg() calls. > + > + Usage: > + > + The printing of pr_debug() and dev_dbg() is controlled by the > + debugfs file, dynamic_printk/modules. This file contains a list of > + the active modules. To add and remove modules: > + > + echo "add <module_name>" > dynamic_printk/modules > + echo "remove <module_name>" > dynamic_printk/modules > + > + For example: > + > + echo "add kobject" > dynamic_printk/modules > + /sbin/modprobe <module> > + > + This will cause kobject debug messages to spew out. Also, a special > + "all" value will print all pr_debug() and dev_dbg() calls. I.e.: > + > + echo "add all" > dynamic_printk/modules > + echo "remove all" > dynamic_printk/modules > + > + Finally, passing "dynamic_printk" at the command line enables all > + pr_debug() and dev_dbg() call to come out (same as "all"). This mode > + can be disabled via a "remove all". > + > source "samples/Kconfig" > > source "lib/Kconfig.kgdb"
--- ~Randy --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch 1/3] dynamic_printk: core
, Jason Baron
, (Tue Apr 29, 11:41 am)
Re: [patch 1/3] dynamic_printk: core
, Tom Spink
, (Tue Apr 29, 12:09 pm)
Re: [patch 1/3] dynamic_printk: core
, Randy Dunlap
, (Wed May 21, 1:35 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Ingo Molnar
Re: [RFC/RFT PATCH] sched: automated per tty task groups
Benjamin Herrenschmidt
[git pull] Please pull powerpc.git merge branch
Vivek Goyal
Re: [PATCH v4] sched: automated per session task groups
Bart Van Assche
Re: Integration of SCST in the mainstream Linux kernel
git
:
Mike Miller
git message
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Jeff King
Re: [PATCH] t7004: test that "git-tag -u" implies "-s"
git-commits-head
:
Linux Kernel Mailing List
libata: disable ATAPI AN by default
Linux Kernel Mailing List
ARM: 5905/1: ARM: Global ASID allocation on SMP
Linux Kernel Mailing List
Documentation/timers/hpet_example.c: only build on X86
Linux Kernel Mailing List
ALSA: hda - Enable beep on Realtek codecs with PCI SSID override
Linux Kernel Mailing List
i915: Don't whine when pci_enable_msi() fails.
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Jeff Garzik
Re: [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM
openbsd-misc
:
Stuart Henderson
Re: Kuro5hin: OpenBSD Founder Theo deRaadt Has Conflict of Interest With AMD
Christian Weisgerber
Re: CARP with a single public IP address
Marco Peereboom
Re: OpenBSD culture?
"RALOVICH, Kristóf"
Re: thinkpad windows refund
Kevin
Re: uvm_mapent_alloc: out of static map entries on 4.3 i386
Colocation donated by:
Syndicate