From: Zheng Yejian <zhengyejian1@huawei.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ross Zwisler <zwisler@google.com>,
Tom Zanussi <zanussi@kernel.org>
Subject: Re: [PATCH] tracing: Add a way to filter function addresses to function names
Date: Tue, 20 Dec 2022 09:40:05 +0800 [thread overview]
Message-ID: <ed4ea9ae-78bf-b323-9380-47b1fd58c72b@huawei.com> (raw)
In-Reply-To: <20221219132102.0dc6b7b9@gandalf.local.home>
On 2022/12/20 02:21, Steven Rostedt wrote:
> On Mon, 19 Dec 2022 10:38:50 +0800
> Zheng Yejian <zhengyejian1@huawei.com> wrote:
>
>>> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
>>> index 33e0b4f8ebe6..db6e2f399440 100644
>>> --- a/kernel/trace/trace_events.c
>>> +++ b/kernel/trace/trace_events.c
>>> @@ -2822,7 +2822,7 @@ static __init int setup_trace_triggers(char *str)
>>> if (!trigger)
>>> break;
>>> bootup_triggers[i].event = strsep(&trigger, ".");
>>> - bootup_triggers[i].trigger = strsep(&trigger, ".");
>>> + bootup_triggers[i].trigger = strsep(&trigger, "");
>>
>> Would it be better to change to:
>>
>> bootup_triggers[i].trigger = trigger;
>>
>
> Sure, I'll make the update.
>
>> Because there is unnecessary loop if call strsep(s, "") :-)
>> strsep(s, ct) {
>> strpbrk(cs, ct) {
>> // when 'ct' is empty string, here will always return NULL
>> // after traversing string 'cs'
>
> I'm not sure what you mean about an extra loop.
I just mean above "traversing string 'cs'" in strpbrk(s, "") is
unnecessary. Sorry for making the ambiguity :-(
>
> Thanks,
>
> -- Steve
>
next prev parent reply other threads:[~2022-12-20 1:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 17:52 Steven Rostedt
2022-12-16 21:38 ` Ross Zwisler
2022-12-16 21:49 ` Steven Rostedt
2022-12-18 1:37 ` Masami Hiramatsu
2022-12-19 2:38 ` Zheng Yejian
2022-12-19 18:21 ` Steven Rostedt
2022-12-20 1:40 ` Zheng Yejian [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-12-13 14:56 Steven Rostedt
2022-12-13 13:49 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=ed4ea9ae-78bf-b323-9380-47b1fd58c72b@huawei.com \
--to=zhengyejian1@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=zanussi@kernel.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
all inboxes | Powered by JetHome®