Skip to content

Commit dbfe673

Browse files
diandersrostedt
authored andcommitted
tracing: kdb: The skip_lines parameter should have been skip_entries
The things skipped by kdb's "ftdump" command when you pass it a parameter has always been entries, not lines. The difference usually doesn't matter but when the trace buffer has multi-line entries (like a stack dump) it can matter. Let's fix this both in the help text for ftdump and also in the local variable names. Link: http://lkml.kernel.org/r/20190319171206.97107-1-dianders@chromium.org Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent e8025ba commit dbfe673

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎kernel/trace/trace_kdb.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "trace.h"
1818
#include "trace_output.h"
1919

20-
static void ftrace_dump_buf(int skip_lines, long cpu_file)
20+
static void ftrace_dump_buf(int skip_entries, long cpu_file)
2121
{
2222
/* use static because iter can be a bit big for the stack */
2323
static struct trace_iterator iter;
@@ -70,11 +70,11 @@ static void ftrace_dump_buf(int skip_lines, long cpu_file)
7070
kdb_printf("---------------------------------\n");
7171
cnt++;
7272

73-
if (!skip_lines) {
73+
if (!skip_entries) {
7474
print_trace_line(&iter);
7575
trace_printk_seq(&iter.seq);
7676
} else {
77-
skip_lines--;
77+
skip_entries--;
7878
}
7979

8080
if (KDB_FLAG(CMD_INTERRUPT))
@@ -106,17 +106,17 @@ static void ftrace_dump_buf(int skip_lines, long cpu_file)
106106
*/
107107
static int kdb_ftdump(int argc, const char **argv)
108108
{
109-
int skip_lines = 0;
109+
int skip_entries = 0;
110110
long cpu_file;
111111
char *cp;
112112

113113
if (argc > 2)
114114
return KDB_ARGCOUNT;
115115

116116
if (argc) {
117-
skip_lines = simple_strtol(argv[1], &cp, 0);
117+
skip_entries = simple_strtol(argv[1], &cp, 0);
118118
if (*cp)
119-
skip_lines = 0;
119+
skip_entries = 0;
120120
}
121121

122122
if (argc == 2) {
@@ -129,15 +129,15 @@ static int kdb_ftdump(int argc, const char **argv)
129129
}
130130

131131
kdb_trap_printk++;
132-
ftrace_dump_buf(skip_lines, cpu_file);
132+
ftrace_dump_buf(skip_entries, cpu_file);
133133
kdb_trap_printk--;
134134

135135
return 0;
136136
}
137137

138138
static __init int kdb_ftrace_register(void)
139139
{
140-
kdb_register_flags("ftdump", kdb_ftdump, "[skip_#lines] [cpu]",
140+
kdb_register_flags("ftdump", kdb_ftdump, "[skip_#entries] [cpu]",
141141
"Dump ftrace log", 0, KDB_ENABLE_ALWAYS_SAFE);
142142
return 0;
143143
}

0 commit comments

Comments
 (0)