public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Huang Yiwei <quic_hyiwei@quicinc.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: <mhiramat@kernel.org>, <mark.rutland@arm.com>,
	<mcgrof@kernel.org>, <keescook@chromium.org>,
	<j.granados@samsung.com>, <mathieu.desnoyers@efficios.com>,
	<corbet@lwn.net>, <linux-kernel@vger.kernel.org>,
	<linux-trace-kernel@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<quic_bjorande@quicinc.com>, <quic_tsoni@quicinc.com>,
	<quic_satyap@quicinc.com>, <quic_aiquny@quicinc.com>,
	<kernel@quicinc.com>, Ross Zwisler <zwisler@google.com>,
	Joel Fernandes <joel@joelfernandes.org>
Subject: Re: [PATCH v3] tracing: Support to dump instance traces by ftrace_dump_on_oops
Date: Tue, 23 Jan 2024 18:23:58 +0800	[thread overview]
Message-ID: <0279a4cb-ced0-447a-a06f-37c38650ed5b@quicinc.com> (raw)
In-Reply-To: <20240119115625.603188d1@gandalf.local.home>



On 1/20/2024 12:56 AM, Steven Rostedt wrote:
> On Fri, 19 Jan 2024 16:08:24 +0800
> Huang Yiwei <quic_hyiwei@quicinc.com> wrote:
> 
>> -	ftrace_dump_on_oops[=orig_cpu]
>> +	ftrace_dump_on_oops[=orig_cpu | =<instance>]
> 
> I wonder if we should have it be:
> 
> 	ftrace_dump_on_oops[=orig_cpu | =<instance> | =<instance>:orig_cpu ]
> 
> Then last would be to only print out a specific CPU trace of the given instance.
> 
> And if we really want to be fancy!
> 
> 	ftrace_dump_on_opps[=orig_cpu | =<instance> | =orig_cpu:<instance> ][,<instance> | ,<instance>:orig_cpu]
> 
Yeah, I agree to make the parameter more flexible.

"=orig_cpu:<instance>" means to dump global and another instance?

I'm thinking of the following format:

ftrace_dump_on_opps[=orig_cpu | =<instance>][,<instance> | 
,<instance>=orig_cpu]

Here list some possible situations:

1. Dump global on orig_cpu:
ftrace_dump_on_oops=orig_cpu

2. Dump global and instance1 on all cpu, instance2 on orig_cpu:
ftrace_dump_on_opps,<instance1>,<instance2>=orig_cpu

3. Dump global and instance1 on orig_cpu, instance2 on all cpu:
ftrace_dump_on_opps=orig_cpu,<instance1>=orig_cpu,<instance2>

4. Dump instance1 on all cpu, instance2 on orig_cpu:
ftrace_dump_on_opps=<instance1>,<instance2>=orig_cpu

5. Dump instance1 and instance2 on orig_cpu:
ftrace_dump_on_opps=<instance1>=orig_cpu,<instance2>=orig_cpu

This makes orig_cpu dump for global same as instance, the parameter may 
seems more unified and users don't need to remember another markers to 
request orig_cpu dump.

But one problem here is if there's an instance named "orig_cpu", then we 
may not dump it correctly.

Regards,
Huang Yiwei

> That would allow dumping more than one instance.
> 
> If you want to dump the main buffer and an instance foo:
> 
> 	ftrace_dump_on_opps,foo
> 
> Where the ',' says to dump the top instance as well as the foo instance.
> 
> -- Steve
> 
> 
>>   			[FTRACE] will dump the trace buffers on oops.
>> -			If no parameter is passed, ftrace will dump
>> -			buffers of all CPUs, but if you pass orig_cpu, it will
>> +			If no parameter is passed, ftrace will dump global
>> +			buffers of all CPUs, if you pass orig_cpu, it will
>>   			dump only the buffer of the CPU that triggered the
>> -			oops.
>> +			oops, or specific instance will be dumped if instance
>> +			name is passed.
>>   

  reply	other threads:[~2024-01-23 10:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240119080907eucas1p12c357eae722d3a60d82c66b81cfc05ba@eucas1p1.samsung.com>
2024-01-19  8:08 ` [PATCH v3] tracing: Support to dump instance traces by ftrace_dump_on_oops Huang Yiwei
2024-01-19 16:56   ` Steven Rostedt
2024-01-23 10:23     ` Huang Yiwei [this message]
2024-01-23 14:49       ` Steven Rostedt
2024-01-23 15:39         ` Steven Rostedt
2024-01-22 13:56   ` Joel Granados
2024-01-23 15:51     ` Bjorn Andersson

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=0279a4cb-ced0-447a-a06f-37c38650ed5b@quicinc.com \
    --to=quic_hyiwei@quicinc.com \
    --cc=corbet@lwn.net \
    --cc=j.granados@samsung.com \
    --cc=joel@joelfernandes.org \
    --cc=keescook@chromium.org \
    --cc=kernel@quicinc.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mcgrof@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=quic_aiquny@quicinc.com \
    --cc=quic_bjorande@quicinc.com \
    --cc=quic_satyap@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=rostedt@goodmis.org \
    --cc=zwisler@google.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