linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Jason Wessel <jason.wessel@windriver.com>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	kgdb-bugreport@lists.sourceforge.net,
	Brian Norris <briannorris@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] tracing: kdb: Allow ftdump to skip all but the last few lines
Date: Wed, 13 Mar 2019 09:47:01 -0400	[thread overview]
Message-ID: <20190313094701.06b4e93d@gandalf.local.home> (raw)
In-Reply-To: <20190312232528.4fa0b806@oasis.local.home>

On Tue, 12 Mar 2019 23:25:28 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Fri,  8 Mar 2019 11:32:05 -0800
> Douglas Anderson <dianders@chromium.org> wrote:
> 
> > The 'ftdump' command in kdb is currently a bit of a last resort, at
> > least if you have lots of traces turned on.  It's going to print a
> > whole boatload of lines out your serial port which is probably running
> > at 115200.  This could easily take many, many minutes.
> > 
> > Usually you're most interested in what's at the _end_ of the ftrace
> > buffer, AKA what happened most recently.  That means you've got to
> > wait the full time for the dump.  The 'ftdump' command does attempt to
> > help you a little bit by allowing you to skip a fixed number of lines.
> > Unfortunately it provides no way for you to know how many lines you
> > should skip.
> > 
> > Let's do similar to python and allow you to use a negative number to
> > indicate that you want to skip all lines except the last few.  This
> > allows you to quickly see what you want.  
> 
> Why not just read how many entries are in the ring buffer and return that?
> 
> 	cnt = 0;
> 	for_each_cpu(cpu, tr->tracing_cpumask)
> 		cnt += ring_buffer_entries_cpu(tr->trace_buffer, cpu);
> 	return cnt;
> 
> The output will print out one entry per line.
> 

Note, I pulled in patch 1 into my queue. So you only need to resend
this patch.

-- Steve

  reply	other threads:[~2019-03-13 13:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 19:32 [PATCH v2 1/2] tracing: kdb: Fix ftdump to not sleep Douglas Anderson
2019-03-08 19:32 ` [PATCH v2 2/2] tracing: kdb: Allow ftdump to skip all but the last few lines Douglas Anderson
2019-03-13  3:25   ` Steven Rostedt
2019-03-13 13:47     ` Steven Rostedt [this message]
2019-03-08 20:19 ` [PATCH v2 1/2] tracing: kdb: Fix ftdump to not sleep Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190313094701.06b4e93d@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=briannorris@chromium.org \
    --cc=daniel.thompson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).