POSIX_TRA...NTSET_ADD(3P)
π POSIX_TRA...NTSET_ADD(3P) β the trace event set glow-up β¨
okay bestie, welcome to the POSIX Programmer's Manual π this one is a 3P page, and it's all about the posix_trace_eventset_* girlies. real talk before we start: the Linux implementation of this interface may differ from what's written here (so go check the corresponding Linux manual page for the actual Linux tea β), or honestly the interface may not even be implemented on Linux at all. no cap.
β¨ PROLOG β¨
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. π«Ά
πΈ NAME πΈ
posix_trace_eventset_add, posix_trace_eventset_del, posix_trace_eventset_empty, posix_trace_eventset_fill, posix_trace_eventset_ismember β manipulate trace event type sets (TRACING)
like... they handle your sets of trace event types. that's the whole vibe. π
π¦ SYNOPSIS π¦
#include <trace.h>
int posix_trace_eventset_add(trace_event_id_t event_id,
trace_event_set_t *set);
int posix_trace_eventset_del(trace_event_id_t event_id,
trace_event_set_t *set);
int posix_trace_eventset_empty(trace_event_set_t *set);
int posix_trace_eventset_fill(trace_event_set_t *set, int what);
int posix_trace_eventset_ismember(trace_event_id_t event_id,
const trace_event_set_t *restrict set, int *restrict ismember);
π DESCRIPTION π
so these primitives manipulate sets of trace event types. and listen β they operate on data objects addressable by the application, not on the current trace event filter of any trace stream. important distinction, don't get it twisted. π
The posix_trace_eventset_add() and posix_trace_eventset_del() functions, respectively, shall add or delete the individual trace event type specified by the value of the argument event_id to or from the trace event type set pointed to by the argument set. and here's the chill part: adding a trace event type that's already in the set, or deleting one that isn't in the set, shall not be considered an error. no drama, we move. π
The posix_trace_eventset_empty() function shall initialize the trace event type set pointed to by the set argument such that all trace event types defined β both system and user β shall be excluded from the set. empty set, cleared out, fresh start energy. β¨
The posix_trace_eventset_fill() function shall initialize the trace event type set pointed to by the argument set, such that the set of trace event types defined by the argument what shall be included in the set. The value of the argument what shall consist of one of the following values, as defined in the <trace.h> header:
POSIX_TRACE_WOPID_EVENTSβ all the process-independent implementation-defined system trace event types are included in the set.POSIX_TRACE_SYSTEM_EVENTSβ all the implementation-defined system trace event types are included in the set, as are those defined in POSIX.1β2008.POSIX_TRACE_ALL_EVENTSβ all trace event types defined, both system and user, are included in the set.
β οΈ okay this is the part where you actually have to listen, bestie. Applications shall call eitherposix_trace_eventset_empty()orposix_trace_eventset_fill()at least once for each object of typetrace_event_set_tprior to any other use of that object. If such an object is not initialized in this way, but is nonetheless supplied as an argument to any of theposix_trace_eventset_add(),posix_trace_eventset_del(), orposix_trace_eventset_ismember()functions, the results are undefined. undefined!! we do not play like that. initialize your objects fr fr. π
The posix_trace_eventset_ismember() function shall test whether the trace event type specified by the value of the argument event_id is a member of the set pointed to by the argument set. The value returned in the object pointed to by the ismember argument is zero if the trace event type identifier is not a member of the set, and a value different from zero if it is a member of the set. membership check, iconic behaviour. π
π RETURN VALUE π
Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error number. that's it, that's the contract. π«Ά
π₯ ERRORS π₯
These functions may fail if:
EINVALβ The value of one of the arguments is invalid.
The following sections are informative.
π EXAMPLES π
None.
like, literally none. the void. π
π§ APPLICATION USAGE π§
None.
also none. we're keeping it mysterious. π
π RATIONALE π
None.
yeah. none here either. the standards girlies said "no thoughts, head empty" on this one.
β FUTURE DIRECTIONS β
The posix_trace_eventset_add(), posix_trace_eventset_del(), posix_trace_eventset_empty(), posix_trace_eventset_fill(), and posix_trace_eventset_ismember() functions may be removed in a future version. so enjoy them while they last, bestie β they're on the way out. π
π SEE ALSO π
posix_trace_eventid_equal()posix_trace_get_filter()- The Base Definitions volume of POSIX.1β2017,
<trace.h>
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie!! π¦ this one was put out into the world by IEEE/The Open Group, dated 2017, and it's the POSIX_TRA...NTSET_ADD(3P) page in the POSIX Programmer's Manual. slay, go initialize your trace_event_set_t objects, mwah π
β¨π«Ά
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms