From: Steven Rostedt <rostedt@goodmis.org>
To: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH] trace-cmd: Use the new libtracefs API to address all dynamic events
Date: Wed, 9 Mar 2022 11:36:37 -0500 [thread overview]
Message-ID: <20220309113637.11f8db4d@gandalf.local.home> (raw)
In-Reply-To: <20220309054458.636350-1-tz.stoyanov@gmail.com>
On Wed, 9 Mar 2022 07:44:58 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
> The trace-cmd reset logic clears all dynamically created ftrace events.
> The current implementation lists all events that should be cleared.
> That logic is fragile, as when a new type of dynamic event is
> introduced the logic should be updated. Instead, the newly introduced
> libtracefs define should be used: TRACEFS_DYNEVENT_ALL.
>
> Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Applied, thanks Tzvetomir!
-- Steve
> ---
> tracecmd/trace-record.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
> index 9afc1042..8d9cbac2 100644
> --- a/tracecmd/trace-record.c
> +++ b/tracecmd/trace-record.c
> @@ -5262,12 +5262,7 @@ static void clear_all_dynamic_events(void)
> {
> /* Clear event probes first, as they may be attached to other dynamic event */
> tracefs_dynevent_destroy_all(TRACEFS_DYNEVENT_EPROBE, true);
> - tracefs_dynevent_destroy_all(TRACEFS_DYNEVENT_KPROBE |
> - TRACEFS_DYNEVENT_KRETPROBE |
> - TRACEFS_DYNEVENT_UPROBE |
> - TRACEFS_DYNEVENT_URETPROBE |
> - TRACEFS_DYNEVENT_SYNTH,
> - true);
> + tracefs_dynevent_destroy_all(TRACEFS_DYNEVENT_ALL, true);
> }
>
> static void clear_func_filters(void)
prev parent reply other threads:[~2022-03-09 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 5:44 [PATCH] trace-cmd: Use the new libtracefs API to address all dynamic events Tzvetomir Stoyanov (VMware)
2022-03-09 16:36 ` Steven Rostedt [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=20220309113637.11f8db4d@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=tz.stoyanov@gmail.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).