From: Steven Rostedt <rostedt@goodmis.org>
To: Zheng Yejian <zhengyejian1@huawei.com>
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: Mon, 19 Dec 2022 13:21:02 -0500 [thread overview]
Message-ID: <20221219132102.0dc6b7b9@gandalf.local.home> (raw)
In-Reply-To: <68fa6a9d-7a7f-00ba-e5a2-9b64f0aa7db3@huawei.com>
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.
Thanks,
-- Steve
next prev parent reply other threads:[~2022-12-19 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 17:52 [PATCH] tracing: Add a way to filter function addresses to function names 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 [this message]
2022-12-20 1:40 ` Zheng Yejian
-- strict thread matches above, loose matches on Subject: below --
2022-12-13 14:56 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=20221219132102.0dc6b7b9@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=zanussi@kernel.org \
--cc=zhengyejian1@huawei.com \
--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;
as well as URLs for NNTP newsgroup(s).