<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/dynamic_printk.c, branch v3.9-rc5</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v3.9-rc5</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v3.9-rc5'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2009-03-24T23:38:26Z</updated>
<entry>
<title>dynamic debug: combine dprintk and dynamic printk</title>
<updated>2009-03-24T23:38:26Z</updated>
<author>
<name>Jason Baron</name>
<email>jbaron@redhat.com</email>
</author>
<published>2009-02-05T16:51:38Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e9d376f0fa66bd630fe27403669c6ae6c22a868f'/>
<id>urn:sha1:e9d376f0fa66bd630fe27403669c6ae6c22a868f</id>
<content type='text'>
This patch combines Greg Bank's dprintk() work with the existing dynamic
printk patchset, we are now calling it 'dynamic debug'.

The new feature of this patchset is a richer /debugfs control file interface,
(an example output from my system is at the bottom), which allows fined grained
control over the the debug output. The output can be controlled by function,
file, module, format string, and line number.

for example, enabled all debug messages in module 'nf_conntrack':

echo -n 'module nf_conntrack +p' &gt; /mnt/debugfs/dynamic_debug/control

to disable them:

echo -n 'module nf_conntrack -p' &gt; /mnt/debugfs/dynamic_debug/control

A further explanation can be found in the documentation patch.

Signed-off-by: Greg Banks &lt;gnb@sgi.com&gt;
Signed-off-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>dynamic_printk: reduce one level of indentation</title>
<updated>2009-01-06T18:44:32Z</updated>
<author>
<name>Wu Fengguang</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2008-12-10T23:43:17Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=2e5ba26a483218b51b7b327fb235b348890aea15'/>
<id>urn:sha1:2e5ba26a483218b51b7b327fb235b348890aea15</id>
<content type='text'>
Cleanup pr_debug_write() to reduce one level of indentation.

Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Acked-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: add newlines to debugging enabled/disabled messages</title>
<updated>2008-12-17T19:23:07Z</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2008-11-30T13:01:26Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=aa6f3c640781c8ac213a4ed3011dcced36f899e3'/>
<id>urn:sha1:aa6f3c640781c8ac213a4ed3011dcced36f899e3</id>
<content type='text'>
Both messages are missing the newline and thus dmesg output gets
scrambled.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: fix using 'ret' variable in unregister_dynamic_debug_module</title>
<updated>2008-12-17T19:23:06Z</updated>
<author>
<name>Johann Felix Soden</name>
<email>johfel@users.sourceforge.net</email>
</author>
<published>2008-10-30T21:44:39Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=1c93ca09863a544cec24fc8e33491f645df80e59'/>
<id>urn:sha1:1c93ca09863a544cec24fc8e33491f645df80e59</id>
<content type='text'>
The 'ret' variable is assigned, but not used in the return statement. Fix this.

Signed-off-by: Johann Felix Soden &lt;johfel@users.sourceforge.net&gt;
Acked-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Driver core: fix 'dynamic_debug' cmd line parameter</title>
<updated>2008-10-29T22:03:50Z</updated>
<author>
<name>Jason Baron</name>
<email>jbaron@redhat.com</email>
</author>
<published>2008-10-27T16:05:14Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=113328306dbdfd5f146f257e447364dc66d025d4'/>
<id>urn:sha1:113328306dbdfd5f146f257e447364dc66d025d4</id>
<content type='text'>
In testing 2.6.28-rc1, I found that passing 'dynamic_printk' on the command
line didn't activate the debug code. The problem is that dynamic_printk_setup()
(which activates the debugging) is being called before dynamic_printk_init() is
called (which initializes infrastructure). Fix this by setting setting the
state to 'DYNAMIC_ENABLED_ALL' in dynamic_printk_setup(), which will also
cause all subsequent modules to have debugging automatically started, which is
probably the behavior we want.

Signed-off-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: basic infrastructure for per-module dynamic debug messages</title>
<updated>2008-10-16T16:24:47Z</updated>
<author>
<name>Jason Baron</name>
<email>jbaron@redhat.com</email>
</author>
<published>2008-08-12T20:46:19Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=346e15beb5343c2eb8216d820f2ed8f150822b08'/>
<id>urn:sha1:346e15beb5343c2eb8216d820f2ed8f150822b08</id>
<content type='text'>
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, &lt;debugfs&gt;/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, 
&lt;debugfs&gt;/dynamic_printk/modules. This file contains a list of the modules that
can be enabled. The format of the file is as follows:

	&lt;module_name&gt; &lt;enabled=0/1&gt;
		.
		.
		.

	&lt;module_name&gt; : Name of the module in which the debug call resides
	&lt;enabled=0/1&gt; : 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 &lt;module_name&gt;" &gt; dynamic_printk/modules

Disable a module:

	$echo "set enabled=0 &lt;module_name&gt;" &gt; dynamic_printk/modules

Enable all modules:

	$echo "set enabled=1 all" &gt; dynamic_printk/modules

Disable all modules:

	$echo "set enabled=0 all" &gt; 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 &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
</feed>
