<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/dynamic_debug.h, branch v3.16.74</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.74</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.74'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-01-17T20:19:09Z</updated>
<entry>
<title>dynamic_debug: dynamic hex dump</title>
<updated>2013-01-17T20:19:09Z</updated>
<author>
<name>Vladimir Kondratiev</name>
<email>qca_vkondrat@qca.qualcomm.com</email>
</author>
<published>2012-12-05T21:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a555613eb77c69eb6e48b61bc5f72dd42fa1780'/>
<id>urn:sha1:7a555613eb77c69eb6e48b61bc5f72dd42fa1780</id>
<content type='text'>
Introduce print_hex_dump_debug() that can be dynamically controlled, similar to
pr_debug.

Also, make print_hex_dump_bytes() dynamically controlled

Implement only 'p' flag (_DPRINTK_FLAGS_PRINT) to keep it simple since hex dump prints
multiple lines and long prefix would impact readability.
To provide line/file etc. information, use pr_debug or similar
before/after print_hex_dump_debug()

Signed-off-by: Vladimir Kondratiev &lt;qca_vkondrat@qca.qualcomm.com&gt;
Signed-off-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dynamic_debug: Remove unnecessary __used</title>
<updated>2012-10-24T22:57:14Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2012-10-18T19:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c0d2af637863940b1a4fb208224ca7acb905c39f'/>
<id>urn:sha1:c0d2af637863940b1a4fb208224ca7acb905c39f</id>
<content type='text'>
The __used attribute prevents gcc from eliminating
unnecessary, otherwise optimized away, metadata for
debugging logging messages.

Remove the __used attribute.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dynamic_debug: use printk(KERN_WARNING..) in stub function</title>
<updated>2012-05-01T12:58:06Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2012-05-01T11:23:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=516cf1be07cf3ab52e6d2f64da33b0fa5d9e0042'/>
<id>urn:sha1:516cf1be07cf3ab52e6d2f64da33b0fa5d9e0042</id>
<content type='text'>
drivers/infiniband/ulp/srp/ib_srp.c #defines pr_fmt() PFX fmt, but PFX
is not #defined until after &lt;linux/*&gt; headers are included.

This results in a bad expansion of the pr_warn() in the stub function.

2084c2084
&lt;   printk("&lt;4&gt;" PFX "dyndbg supported only in " "CONFIG_DYNAMIC_DEBUG builds\n")

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dynamic_debug: make dynamic-debug work for module initialization</title>
<updated>2012-04-30T18:31:46Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2012-04-27T20:30:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b48420c1d3019ce8d84fb8e58f4ca86b8e3655b8'/>
<id>urn:sha1:b48420c1d3019ce8d84fb8e58f4ca86b8e3655b8</id>
<content type='text'>
This introduces a fake module param $module.dyndbg.  Its based upon
Thomas Renninger's $module.ddebug boot-time debugging patch from
https://lkml.org/lkml/2010/9/15/397

The 'fake' module parameter is provided for all modules, whether or
not they need it.  It is not explicitly added to each module, but is
implemented in callbacks invoked from parse_args.

For builtin modules, dynamic_debug_init() now directly calls
parse_args(..., &amp;ddebug_dyndbg_boot_params_cb), to process the params
undeclared in the modules, just after the ddebug tables are processed.

While its slightly weird to reprocess the boot params, parse_args() is
already called repeatedly by do_initcall_levels().  More importantly,
the dyndbg queries (given in ddebug_query or dyndbg params) cannot be
activated until after the ddebug tables are ready, and reusing
parse_args is cleaner than doing an ad-hoc parse.  This reparse would
break options like inc_verbosity, but they probably should be params,
like verbosity=3.

ddebug_dyndbg_boot_params_cb() handles both bare dyndbg (aka:
ddebug_query) and module-prefixed dyndbg params, and ignores all other
parameters.  For example, the following will enable pr_debug()s in 4
builtin modules, in the order given:

  dyndbg="module params +p; module aio +p" module.dyndbg=+p pci.dyndbg

For loadable modules, parse_args() in load_module() calls
ddebug_dyndbg_module_params_cb().  This handles bare dyndbg params as
passed from modprobe, and errors on other unknown params.

Note that modprobe reads /proc/cmdline, so "modprobe foo" grabs all
foo.params, strips the "foo.", and passes these to the kernel.
ddebug_dyndbg_module_params_cb() is again called for the unknown
params; it handles dyndbg, and errors on others.  The "doing" arg
added previously contains the module name.

For non CONFIG_DYNAMIC_DEBUG builds, the stub function accepts
and ignores $module.dyndbg params, other unknowns get -ENOENT.

If no param value is given (as in pci.dyndbg example above), "+p" is
assumed, which enables all pr_debug callsites in the module.

The dyndbg fake parameter is not shown in /sys/module/*/parameters,
thus it does not use any resources.  Changes to it are made via the
control file.

Also change pr_info in ddebug_exec_queries to vpr_info,
no need to see it all the time.

Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.com&gt;
CC: Thomas Renninger &lt;trenn@suse.de&gt;
CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dynamic_debug: fix leading spaces in dynamic_debug.h</title>
<updated>2012-04-30T17:35:31Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2012-04-27T20:30:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3faa286055c02291dc9b6d838601dcb105a64a14'/>
<id>urn:sha1:3faa286055c02291dc9b6d838601dcb105a64a14</id>
<content type='text'>
clean up some space-before-tabs problems.

Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.com&gt;
Acked-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dynamic_debug: reduce lineno field to a saner 18 bits</title>
<updated>2012-01-24T20:48:54Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2011-12-19T22:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e703ddae383abb24b1c7f363cb0df7e78a44ea45'/>
<id>urn:sha1:e703ddae383abb24b1c7f363cb0df7e78a44ea45</id>
<content type='text'>
lineno:24 allows files with 4 million lines, an insane file-size, even
for never-to-get-in-tree machine generated code.  Reduce this to 18
bits, which still allows 256k lines.  This is still insanely big, but
its not raving mad.

Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.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_debug: describe_flags with '=[pmflt_]*'</title>
<updated>2012-01-24T20:48:52Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2011-12-19T22:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5ca7d2a6c5e4f24dfe39e8383c6d32e61d95d16a'/>
<id>urn:sha1:5ca7d2a6c5e4f24dfe39e8383c6d32e61d95d16a</id>
<content type='text'>
Change describe_flags() to emit '=[pmflt_]+' for current callsite
flags, or just '=_' when they're disabled.  Having '=' in output
allows a more selective grep expression; in contrast '-' may appear
in filenames, line-ranges, and format-strings.  '=' also has better
mnemonics, saying; "the current setting is equal to &lt;flags&gt;".

This allows grep "=_" &lt;dbgfs&gt;/dynamic_debug/control to see disabled
callsites while avoiding the many occurrences of " = " seen in format
strings.

Enlarge flagsbufs to handle additional flag char, and alter
ddebug_parse_flags() to allow flags=0, so that user can turn off all
debug flags via:

  ~# echo =_ &gt; &lt;dbgfs&gt;/dynamic_debug/control

Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.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_debug: make dynamic-debug supersede DEBUG ccflag</title>
<updated>2012-01-24T20:46:44Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2011-12-19T22:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b558c96ffa53f4b3dd52b774e4fb7a52982ab52b'/>
<id>urn:sha1:b558c96ffa53f4b3dd52b774e4fb7a52982ab52b</id>
<content type='text'>
If CONFIG_DYNAMIC_DEBUG is defined, honor it over DEBUG, so that
pr_debug()s are controllable, instead of always-on.  When DEBUG is
also defined, change _DPRINTK_FLAGS_DEFAULT to enable printing by
default.

Also adding _DPRINTK_FLAGS_INCL_MODNAME would be nice, but there are
numerous cases of pr_debug(NAME ": ...), which would result in double
printing of module-name.  So defer this until things settle.

Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.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_debug: drop enabled field from struct _ddebug, use _DPRINTK_FLAGS_PRINT</title>
<updated>2012-01-24T20:46:44Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2011-12-19T22:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87e6f968339bcdda56b39572c7e63331192296a0'/>
<id>urn:sha1:87e6f968339bcdda56b39572c7e63331192296a0</id>
<content type='text'>
Currently any enabled dynamic-debug flag on a pr_debug callsite will
enable printing, even if _DPRINTK_FLAGS_PRINT is off.  Checking print
flag directly allows "-p" to disable callsites without fussing with
other flags, so the following disables everything, without altering
flags user may have set:

	echo -p &gt; $DBGFS/dynamic_debug/control

Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.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>treewide: use __printf not __attribute__((format(printf,...)))</title>
<updated>2011-11-01T00:30:54Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-11-01T00:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b9075fa968a0a4347aef35e235e2995c0e57dddd'/>
<id>urn:sha1:b9075fa968a0a4347aef35e235e2995c0e57dddd</id>
<content type='text'>
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
  grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
  xargs perl -n -i -e 'local $/; while (&lt;&gt;) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill@shutemov.name&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
