linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).