lkml.org 
[lkml]   [2019]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v4 3/3] tracing: kdb: Allow ftdump to skip all but the last few entries
On Mon, 18 Mar 2019 03:02:38 +0000
Daniel Thompson <daniel.thompson@linaro.org> wrote:

> > diff --git a/kernel/trace/trace_kdb.c b/kernel/trace/trace_kdb.c
> > index 4b666643d69f..996e1e9cd9a6 100644
> > --- a/kernel/trace/trace_kdb.c
> > +++ b/kernel/trace/trace_kdb.c
> > @@ -39,7 +39,8 @@ static void ftrace_dump_buf(int skip_entries, long cpu_file)
> > /* don't look at user memory in panic mode */
> > tr->trace_flags &= ~TRACE_ITER_SYM_USEROBJ;
> >
> > - kdb_printf("Dumping ftrace buffer:\n");
> > + kdb_printf("Dumping ftrace buffer (skipping %d entries):\n",
> > + skip_entries);
>
> If someone *doesn't* need to skip any entries I'm not a fan of telling
> them we are "skipping 0 entries"; it is more unnerving than helpful
> ("huh? what does it need to tell me that no entried were skipped?
> what makes the tracer skip entries?... Doh... I get it").

I agree.

Probably best to have this:

kdb_printf("Dumping ftrace buffer:\n");
if (skip_entries)
kdb_printf("(skipping %d entries)\n", skip_entries);

No reason to inject that skipping line in the first line.

-- Steve
\
 
 \ /
  Last update: 2019-03-18 14:54    [W:0.084 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site