* [PATCH] libtracefs: Add define for ALL dynamic events
@ 2022-02-14 8:02 Tzvetomir Stoyanov (VMware)
2022-02-24 1:52 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2022-02-14 8:02 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel
Some of the tracefs APIs for dynamic events accept bitmask of events. If
a caller wants to address all types of events, it should list them in
the bitmask. This logic is fragile. When a new type of dynamic event is
introduced, the API callers should be modified. That's why a new define
is added, part of the library API, to address all types of dynamic
events.
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
include/tracefs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/tracefs.h b/include/tracefs.h
index 1848ad0..b3694cb 100644
--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -261,6 +261,8 @@ enum tracefs_dynevent_type {
TRACEFS_DYNEVENT_MAX = 1 << 6,
};
+#define TRACEFS_DYNEVENT_ALL 0xFFFFFFFF
+
int tracefs_dynevent_create(struct tracefs_dynevent *devent);
int tracefs_dynevent_destroy(struct tracefs_dynevent *devent, bool force);
int tracefs_dynevent_destroy_all(unsigned int types, bool force);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] libtracefs: Add define for ALL dynamic events
2022-02-14 8:02 [PATCH] libtracefs: Add define for ALL dynamic events Tzvetomir Stoyanov (VMware)
@ 2022-02-24 1:52 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2022-02-24 1:52 UTC (permalink / raw)
To: Tzvetomir Stoyanov (VMware); +Cc: linux-trace-devel
On Mon, 14 Feb 2022 10:02:41 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
> Some of the tracefs APIs for dynamic events accept bitmask of events. If
> a caller wants to address all types of events, it should list them in
> the bitmask. This logic is fragile. When a new type of dynamic event is
> introduced, the API callers should be modified. That's why a new define
> is added, part of the library API, to address all types of dynamic
> events.
>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
And of course, after I release 1.3, I discovered I forgot about this patch :-p
Well, it's usually a tradition to release a .1 right after a .0 due to
something stupid I did :-/
-- Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-24 1:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-14 8:02 [PATCH] libtracefs: Add define for ALL dynamic events Tzvetomir Stoyanov (VMware)
2022-02-24 1:52 ` Steven Rostedt
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).