remarkable-linux/scripts
Jason Baron 346e15beb5 driver core: basic infrastructure for per-module dynamic debug messages
Base infrastructure to enable per-module debug messages.

I've introduced CONFIG_DYNAMIC_PRINTK_DEBUG, which when enabled centralizes
control of debugging statements on a per-module basis in one /proc file,
currently, <debugfs>/dynamic_printk/modules. When, CONFIG_DYNAMIC_PRINTK_DEBUG,
is not set, debugging statements can still be enabled as before, often by
defining 'DEBUG' for the proper compilation unit. Thus, this patch set has no
affect when CONFIG_DYNAMIC_PRINTK_DEBUG is not set.

The infrastructure currently ties into all pr_debug() and dev_dbg() calls. That
is, if CONFIG_DYNAMIC_PRINTK_DEBUG is set, all pr_debug() and dev_dbg() calls
can be dynamically enabled/disabled on a per-module basis.

Future plans include extending this functionality to subsystems, that define 
their own debug levels and flags.

Usage:

Dynamic debugging is controlled by the debugfs file, 
<debugfs>/dynamic_printk/modules. This file contains a list of the modules that
can be enabled. The format of the file is as follows:

	<module_name> <enabled=0/1>
		.
		.
		.

	<module_name> : Name of the module in which the debug call resides
	<enabled=0/1> : whether the messages are enabled or not

For example:

	snd_hda_intel enabled=0
	fixup enabled=1
	driver enabled=0

Enable a module:

	$echo "set enabled=1 <module_name>" > dynamic_printk/modules

Disable a module:

	$echo "set enabled=0 <module_name>" > dynamic_printk/modules

Enable all modules:

	$echo "set enabled=1 all" > dynamic_printk/modules

Disable all modules:

	$echo "set enabled=0 all" > dynamic_printk/modules

Finally, passing "dynamic_printk" at the command line enables
debugging for all modules. This mode can be turned off via the above
disable command.

[gkh: minor cleanups and tweaks to make the build work quietly]

Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16 09:24:47 -07:00
..
basic driver core: basic infrastructure for per-module dynamic debug messages 2008-10-16 09:24:47 -07:00
genksyms kbuild: genksyms: Include extern information in dumps 2008-07-31 23:01:31 +02:00
kconfig kconfig: readd lost change count 2008-09-29 08:03:01 -07:00
ksymoops
mod modpost: add support for hid 2008-10-14 23:50:47 +02:00
package
rt-tester
selinux SELinux: add gitignore file for mdp script 2008-09-05 21:43:38 +10:00
.gitignore
bin2c.c
binoffset.c
bloat-o-meter
bootgraph.pl fastboot: Fix bootgraph.pl initcall name regexp 2008-10-12 08:07:44 -07:00
checkincludes.pl
checkkconfigsymbols.sh
checkpatch.pl checkpatch: version 0.21 2008-07-24 10:47:27 -07:00
checkstack.pl [S390] Fix checkstack for s390 2008-10-10 21:34:03 +02:00
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
conmakehash.c
decodecode Mark 'scripts/decodecode' executable 2008-05-30 14:02:21 -07:00
diffconfig kconfig: add diffconfig utility 2008-07-25 22:12:41 +02:00
export_report.pl
extract-ikconfig
gcc-version.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh kbuild: fix unportability in gen_initramfs_list.sh 2008-04-28 22:50:51 +02:00
headers.sh kbuild: prepare headers_* for arch/$ARCH/include 2008-07-25 22:12:33 +02:00
headers_check.pl kbuild: optimize headers_* targets 2008-07-25 22:12:16 +02:00
headers_install.pl kbuild: install all headers when arch is changed 2008-07-25 22:12:18 +02:00
kallsyms.c kbuild: filter away debug symbols from kernel symbols 2008-05-19 20:07:58 +02:00
Kbuild.include kbuild: fix cc-option and cc-option-yn 2008-09-09 11:52:33 -07:00
kernel-doc kernel-doc: allow structs whose members are all private 2008-09-23 08:09:13 -07:00
Lindent scripts/Lindent: support gnu indent v2.2.10 2008-04-29 08:06:04 -07:00
Makefile selinux: add support for installing a dummy policy (v2) 2008-08-27 08:54:08 +10:00
Makefile.build kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.clean kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.fwinst firmware: silence __fw_modbuild and __fw_modinst 'Nothing to be done' messages 2008-08-02 07:52:29 +01:00
Makefile.headersinst kbuild: install all headers when arch is changed 2008-07-25 22:12:18 +02:00
Makefile.host kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.lib driver core: basic infrastructure for per-module dynamic debug messages 2008-10-16 09:24:47 -07:00
Makefile.modinst
Makefile.modpost markers: fix duplicate modpost entry 2008-07-22 09:59:41 -07:00
makelst
mkcompile_h
mkmakefile
mksysmap kbuild: filter away debug symbols from kernel symbols 2008-05-19 20:07:58 +02:00
mkuboot.sh
mkversion
namespace.pl
patch-kernel bugfix for scripts/patch-kernel in 2.6 sublevel stepping 2008-08-06 22:11:33 +02:00
pnmtologo.c
profile2linkerlist.pl
setlocalversion setlocalversion: do not describe if there is nothing to describe 2008-07-25 22:12:53 +02:00
show_delta
unifdef.c
ver_linux kbuild: scripts/ver_linux: don't set PATH 2008-07-31 23:36:54 +02:00