summaryrefslogtreecommitdiffstats
path: root/Documentation/admin-guide/dynamic-debug-howto.rst
AgeCommit message (Collapse)AuthorFilesLines
2020-07-24dyndbg: accept query terms like file=bar and module=fooJim Cromie1-0/+1
Current code expects "keyword" "arg" as 2 words, space separated. Change to also accept "keyword=arg" form as well, and drop !(nwords%2) requirement. Then in rest of function, use new keyword, arg variables instead of word[i], word[i+1] Acked-by: <jbaron@akamai.com> Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Link: https://lore.kernel.org/r/20200719231058.1586423-15-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-24dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100'Jim Cromie1-0/+5
Accept these additional query forms: echo "file $filestr +_" > control path/to/file.c:100 # as from control, column 1 path/to/file.c:1-100 # or any legal line-range path/to/file.c:func_A # as from an editor/browser path/to/file.c:drm_* # wildcards still work path/to/file.c:*_foo # lead wildcard too 1st 2 examples are treated as line-ranges, 3-5 are treated as func's Doc these changes, and sprinkle in a few extra wild-card examples and trailing # explanation texts. Acked-by: <jbaron@akamai.com> Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Link: https://lore.kernel.org/r/20200719231058.1586423-14-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-24dyndbg-docs: initialization is done early, not archJim Cromie1-2/+2
since cf964976484 in 2012, initialization is done with early_initcall, update the Docs, which still say arch_initcall. Acked-by: <jbaron@akamai.com> Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Link: https://lore.kernel.org/r/20200719231058.1586423-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-24dyndbg-docs: eschew file /full/path query in docsJim Cromie1-10/+9
Regarding: commit 2b6783191da7 ("dynamic_debug: add trim_prefix() to provide source-root relative paths") commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path") 2nd commit broke dynamic-debug's "file $fullpath" query form, but nobody noticed because 1st commit had trimmed prefixes from control-file output, so the click-copy-pasting of fullpaths into new queries had ceased; that query form became unused. Removing the function is cleanest, but it could be useful in old-compiler corner cases, where __FILE__ still has /full/path, and it safely does nothing otherwize. So instead, quietly deprecate "file /full/path" query form, by removing all /full/paths examples in the docs. I skipped adding a back-compat note. Acked-by: <jbaron@akamai.com> Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Link: https://lore.kernel.org/r/20200719231058.1586423-2-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-08dynamic_debug: add an option to enable dynamic debug for modules onlyOrson Zhai1-0/+5
Instead of enabling dynamic debug globally with CONFIG_DYNAMIC_DEBUG, CONFIG_DYNAMIC_DEBUG_CORE will only enable core function of dynamic debug. With the DYNAMIC_DEBUG_MODULE defined for any modules, dynamic debug will be tied to them. This is useful for people who only want to enable dynamic debug for kernel modules without worrying about kernel image size and memory consumption is increasing too much. [orson.zhai@unisoc.com: v2] Link: http://lkml.kernel.org/r/1587408228-10861-1-git-send-email-orson.unisoc@gmail.com Signed-off-by: Orson Zhai <orson.zhai@unisoc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Petr Mladek <pmladek@suse.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jason Baron <jbaron@akamai.com> Cc: Randy Dunlap <rdunlap@infradead.org> Link: http://lkml.kernel.org/r/1586521984-5890-1-git-send-email-orson.unisoc@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-02-12dynamic_debug: allow to work if debugfs is disabledGreg Kroah-Hartman1-0/+3
With the realization that having debugfs enabled on "production" systems is generally not a good idea, debugfs is being disabled from more and more platforms over time. However, the functionality of dynamic debugging still is needed at times, and since it relies on debugfs for its user api, having debugfs disabled also forces dynamic debug to be disabled. To get around this, also create the "control" file for dynamic_debug in procfs. This allows people turn on debugging as needed at runtime for individual driverfs and subsystems. Reported-by: many different companies Cc: Jason Baron <jbaron@akamai.com> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20200210211142.GB1373304@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07Documentation: dynamic-debug: fix wildcard descriptionRandy Dunlap1-2/+2
Fix grammar about wildcards and insert a space between sentences. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jason Baron <jbaron@akamai.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: Will Korteland <will@korte.land> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-11-07Documentation: dynamic_debug: fix a couple of typosRandy Dunlap1-2/+2
Fix a few "typos" in dynamic-debug-howto.rst. s/dyndbg_query/ddebug_query/ s/sysfs/debugfs/ Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jason Baron <jbaron@akamai.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-11-17dynamic_debug documentation: minor fixesRandy Dunlap1-3/+3
Fix minor typo. Fix missing words in explaining parsing of last line number. Link: http://lkml.kernel.org/r/ebb7ff42-4945-103f-d5b4-f07a6f3343a7@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jason Baron <jbaron@akamai.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-01-26dynamic-debug-howto: Correct echo -c to -nSteven Price1-2/+2
Two of the example command lines use an argument to echo of "-c" which isn't valid in (most versions of) echo causing these examples to fail. Correct the argument to "-n" which works correctly. Signed-off-by: Steven Price <steven@ecrips.co.uk> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-10-24docs-rst: create an user's manual bookMauro Carvalho Chehab1-0/+353
Place README, REPORTING-BUGS, SecurityBugs and kernel-parameters on an user's manual book. As we'll be numbering the user's manual, remove the manual numbering from SecurityBugs. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>