1POSIX_TRACE_EVENTSET_ADD(P)POSIX Programmer's ManualPOSIX_TRACE_EVENTSET_ADD(P)
2
3
4
6 posix_trace_eventset_add, posix_trace_eventset_del,
7 posix_trace_eventset_empty, posix_trace_eventset_fill,
8 posix_trace_eventset_ismember - manipulate trace event type sets (TRAC‐
9 ING)
10
12 #include <trace.h>
13
14 int posix_trace_eventset_add(trace_event_id_t event_id,
15 trace_event_set_t *set);
16 int posix_trace_eventset_del(trace_event_id_t event_id,
17 trace_event_set_t *set);
18 int posix_trace_eventset_empty(trace_event_set_t *set);
19 int posix_trace_eventset_fill(trace_event_set_t *set, int what);
20 int posix_trace_eventset_ismember(trace_event_id_t event_id,
21 const trace_event_set_t *restrict set, int *restrict ismember);
22
23
25 These primitives manipulate sets of trace event types. They operate on
26 data objects addressable by the application, not on the current trace
27 event filter of any trace stream.
28
29 The posix_trace_eventset_add() and posix_trace_eventset_del() func‐
30 tions, respectively, shall add or delete the individual trace event
31 type specified by the value of the argument event_id to or from the
32 trace event type set pointed to by the argument set. Adding a trace
33 event type already in the set or deleting a trace event type not in the
34 set shall not be considered an error.
35
36 The posix_trace_eventset_empty() function shall initialize the trace
37 event type set pointed to by the set argument such that all trace event
38 types defined, both system and user, shall be excluded from the set.
39
40 The posix_trace_eventset_fill() function shall initialize the trace
41 event type set pointed to by the argument set, such that the set of
42 trace event types defined by the argument what shall be included in the
43 set. The value of the argument what shall consist of one of the follow‐
44 ing values, as defined in the <trace.h> header:
45
46 POSIX_TRACE_WOPID_EVENTS
47
48 All the process-independent implementation-defined system trace
49 event types are included in the set.
50
51 POSIX_TRACE_SYSTEM_EVENTS
52
53 All the implementation-defined system trace event types are
54 included in the set, as are those defined in
55 IEEE Std 1003.1-2001.
56
57 POSIX_TRACE_ALL_EVENTS
58
59 All trace event types defined, both system and user, are
60 included in the set.
61
62
63 Applications shall call either posix_trace_eventset_empty() or
64 posix_trace_eventset_fill() at least once for each object of type
65 trace_event_set_t prior to any other use of that object. If such an
66 object is not initialized in this way, but is nonetheless supplied as
67 an argument to any of the posix_trace_eventset_add(),
68 posix_trace_eventset_del(), or posix_trace_eventset_ismember() func‐
69 tions, the results are undefined.
70
71 The posix_trace_eventset_ismember() function shall test whether the
72 trace event type specified by the value of the argument event_id is a
73 member of the set pointed to by the argument set. The value returned in
74 the object pointed to by ismember argument is zero if the trace event
75 type identifier is not a member of the set and a value different from
76 zero if it is a member of the set.
77
79 Upon successful completion, these functions shall return a value of
80 zero. Otherwise, they shall return the corresponding error number.
81
83 These functions may fail if:
84
85 EINVAL The value of one of the arguments is invalid.
86
87
88 The following sections are informative.
89
91 None.
92
94 None.
95
97 None.
98
100 None.
101
103 posix_trace_set_filter() , posix_trace_trid_eventid_open() , the Base
104 Definitions volume of IEEE Std 1003.1-2001, <trace.h>
105
107 Portions of this text are reprinted and reproduced in electronic form
108 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
109 -- Portable Operating System Interface (POSIX), The Open Group Base
110 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
111 Electrical and Electronics Engineers, Inc and The Open Group. In the
112 event of any discrepancy between this version and the original IEEE and
113 The Open Group Standard, the original IEEE and The Open Group Standard
114 is the referee document. The original Standard can be obtained online
115 at http://www.opengroup.org/unix/online.html .
116
117
118
119IEEE/The Open Group 2003 POSIX_TRACE_EVENTSET_ADD(P)