Thread (31 messages) 31 messages, 2 authors, 2021-05-12
STALE1859d

[RFC PATCH v5 23/28] dyndbg: dont show header records in control

From: Jim Cromie <jim.cromie@gmail.com>
Date: 2021-05-11 18:52:43
Also in: lkml
Subsystem: dynamic debug, library code, the rest · Maintainers: Jason Baron, Jim Cromie, Andrew Morton, Linus Torvalds

header record pairs are special in that the filename member no longer
points at string data, but back at the data structure.

Theres no reason to expose this in control file, and no reason to even
print a line for the header, since its not part of the interface.

Printing a "# header" line is a decent alternative, but separate.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 lib/dynamic_debug.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index d0477450ec0c..b83187e72ee0 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -995,7 +995,9 @@ static int ddebug_proc_show(struct seq_file *m, void *p)
 
 	dc = ddebug_site_get(dp);
 
-	if (dc) {
+	if (dc && is_dyndbg_header_pair(dp, dc)) {
+		/* skip output on header */
+	} else if (dc) {
 		seq_printf(m, "%s:%u [%s]%s =%s \"",
 			   trim_prefix(dc->filename), dp->lineno,
 			   iter->table->mod_name, dc->function,
-- 
2.31.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help