From: Michael Ellerman <mpe@ellerman•id.au>
To: Breno Leitao <leitao@debian•org>, linuxppc-dev@lists•ozlabs.org
Cc: Breno Leitao <leitao@debian•org>
Subject: Re: [PATCH v3 1/2] powerpc/xmon: Dump ftrace buffers for the current CPU only
Date: Mon, 14 Aug 2017 23:00:07 +1000 [thread overview]
Message-ID: <87efseqp7s.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1501704846-22625-1-git-send-email-leitao@debian.org>
Breno Leitao <leitao@debian•org> writes:
> @@ -2231,6 +2232,19 @@ static void xmon_rawdump (unsigned long adrs, long ndump)
> printf("\n");
> }
>
> +static void dump_tracing(void)
> +{
> + int c;
> +
> + c = inchar();
> + if (c == 'c')
> + ftrace_dump(DUMP_ORIG);
> + else
> + ftrace_dump(DUMP_ALL);
> +
> + tracing_on();
> +}
Thinking about this some more, two things that would make this *really*
useful.
Firstly, it would be great if we could dump the buffer for *another*
CPU. Currently ftrace_dump() doesn't support that, and maybe it can't
because of the ring buffer design (?), but it would be really great if
you could dump another CPU's buffer.
That would be great eg. when a CPU is stuck and doesn't come into xmon,
you could use the trace buffer to work out where it is. You can do it
now, by dumping the whole trace buffer, but it's quite tricky to spot
that one CPU amongst all the others.
The second thing that would be good is if dumping the trace buffer from
xmon didn't consume the trace. Currently if you do 'dt' to dump the
trace buffer, and then realise actually you should have just dumped it
for one CPU then you're out of luck.
So it'd be nice if we could dump but leave the trace intact. That would
also be good from an "xmon doesn't perturb the system" (too much) point
of view, ie. if you drop to xmon and dump the trace then currently the
trace is no longer available.
cheers
next prev parent reply other threads:[~2017-08-14 13:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 20:14 [PATCH v3 1/2] powerpc/xmon: Dump ftrace buffers for the current CPU only Breno Leitao
2017-08-02 20:14 ` [PATCH v3 2/2] powerpc/xmon: Disable tracing when entering xmon Breno Leitao
2017-08-16 12:29 ` [v3,2/2] " Michael Ellerman
2017-08-14 11:31 ` [PATCH v3 1/2] powerpc/xmon: Dump ftrace buffers for the current CPU only Michael Ellerman
2017-08-14 13:00 ` Michael Ellerman [this message]
2017-08-14 20:10 ` Breno Leitao
2017-08-15 3:37 ` Michael Ellerman
2017-08-16 12:29 ` [v3, " Michael Ellerman
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=87efseqp7s.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=leitao@debian$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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