Messages in this thread Patch in this message |  | | From | Jim Cromie <> | Subject | [PATCH v2 22/24] dyndbg: add print-class as trailing number to control output | Date | Sat, 13 Jun 2020 09:57:36 -0600 |
| |
This change adds trailing 0 for all existing callsites, and N>0 for any uses of pr_debug_n().
subsequent patches add pr_debug_n(1) & pr_debug_n(2) to kset-example, demonstrating that the callsite descriptors are getting initialized properly by the *_cl adaptations done previously.
bash-5.0# modprobe kset-example bash-5.0# grep -v '0$' control [ 311.060809] dynamic_debug:ddebug_proc_open: called samples/kobject/kset-example.c:80 [kset_example]foo_attr_store =_ "called" 2 samples/kobject/kset-example.c:59 [kset_example]foo_attr_show =_ "called" 1 --- lib/dynamic_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 0035218d7059..262a6a761219 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -919,7 +919,7 @@ static int ddebug_proc_show(struct seq_file *m, void *p) if (p == SEQ_START_TOKEN) { seq_puts(m, - "# filename:lineno [module]function flags format\n"); + "# filename:lineno [module]function flags format prcls\n"); return 0; } @@ -928,7 +928,7 @@ static int ddebug_proc_show(struct seq_file *m, void *p) iter->table->mod_name, dp->function, ddebug_describe_flags(dp->flags, &flags)); seq_escape(m, dp->format, "\t\r\n\""); - seq_puts(m, "\"\n"); + seq_printf(m, "\" %d\n", dp->pr_class); return 0; } -- 2.26.2
|  |