From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: sunliming <sunliming@kylinos.cn>
Cc: rostedt@goodmis.org, beaub@linux.microsoft.com,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] tracing/user_events: Handle matching arguments that is null from dyn_events
Date: Mon, 29 May 2023 17:21:49 +0900 [thread overview]
Message-ID: <20230529172149.fec12da876356c1a679d8bcb@kernel.org> (raw)
In-Reply-To: <20230529065110.303440-1-sunliming@kylinos.cn>
On Mon, 29 May 2023 14:51:10 +0800
sunliming <sunliming@kylinos.cn> wrote:
> When A registering user event from dyn_events has no argments, it will pass the
> matching check, regardless of whether there is a user event with the same name
> and arguments. Add the matching check when the arguments of registering user
> event is null.
OK, since the user_events doesn't support multi-definitions on the same name
event, this should be checked.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thank you!
>
> Signed-off-by: sunliming <sunliming@kylinos.cn>
> ---
> kernel/trace/trace_events_user.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
> index e90161294698..0d91dac206ff 100644
> --- a/kernel/trace/trace_events_user.c
> +++ b/kernel/trace/trace_events_user.c
> @@ -1712,6 +1712,8 @@ static bool user_event_match(const char *system, const char *event,
>
> if (match && argc > 0)
> match = user_fields_match(user, argc, argv);
> + else if (match && argc == 0)
> + match = list_empty(&user->fields);
>
> return match;
> }
> --
> 2.25.1
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2023-05-29 8:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 6:51 [PATCH] tracing/user_events: Handle matching arguments that is null from dyn_events sunliming
2023-05-29 8:21 ` Masami Hiramatsu [this message]
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=20230529172149.fec12da876356c1a679d8bcb@kernel.org \
--to=mhiramat@kernel.org \
--cc=beaub@linux.microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sunliming@kylinos.cn \
/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