PROLOG |NAME |SYNOPSIS |DESCRIPTION |RETURN VALUE |ERRORS |EXAMPLES |APPLICATION USAGE |RATIONALE |FUTURE DIRECTIONS |SEE ALSO |COPYRIGHT | |
POSIX_TR...TSET_ADD(3P) POSIX Programmer's ManualPOSIX_TR...TSET_ADD(3P)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.
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)
#include <trace.h> int posix_trace_eventset_add(trace_event_id_tevent_id, trace_event_set_t *set); int posix_trace_eventset_del(trace_event_id_tevent_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, intwhat); int posix_trace_eventset_ismember(trace_event_id_tevent_id, const trace_event_set_t *restrictset, int *restrictismember);
These primitives manipulate sets of trace event types. They operate on data objects addressable by the application, not on the current trace event filter of any trace stream. Theposix_trace_eventset_add() andposix_trace_eventset_del() functions, respectively, shall add or delete the individual trace event type specified by the value of the argumentevent_id to or from the trace event type set pointed to by the argumentset. Adding a trace event type already in the set or deleting a trace event type not in the set shall not be considered an error. Theposix_trace_eventset_empty() function shall initialize the trace event type set pointed to by theset argument such that all trace event types defined, both system and user, shall be excluded from the set. Theposix_trace_eventset_fill() function shall initialize the trace event type set pointed to by the argumentset, such that the set of trace event types defined by the argumentwhat shall be included in the set. The value of the argumentwhat 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. 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. Theposix_trace_eventset_ismember() function shall test whether the trace event type specified by the value of the argumentevent_id is a member of the set pointed to by the argumentset. The value returned in the object pointed to byismember 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.
Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error number.
These functions may fail if:EINVALThe value of one of the arguments is invalid.The following sections are informative.
None.
None.
None.
Theposix_trace_eventset_add(),posix_trace_eventset_del(),posix_trace_eventset_empty(),posix_trace_eventset_fill(), andposix_trace_eventset_ismember() functions may be removed in a future version.
posix_trace_eventid_equal(3p),posix_trace_get_filter(3p) The Base Definitions volume of POSIX.1‐2017,trace.h(0p)
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 athttp://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, seehttps://www.kernel.org/doc/man-pages/reporting_bugs.html .IEEE/The Open Group 2017POSIX_TR...TSET_ADD(3P)Pages that refer to this page:trace.h(0p), posix_trace_get_filter(3p)
HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |