1POSIX_TRACE_GET_FILTER(3P) POSIX Programmer's ManualPOSIX_TRACE_GET_FILTER(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 posix_trace_get_filter, posix_trace_set_filter — retrieve and set the
14 filter of an initialized trace stream (TRACING)
15
17 #include <trace.h>
18
19 int posix_trace_get_filter(trace_id_t trid, trace_event_set_t *set);
20 int posix_trace_set_filter(trace_id_t trid,
21 const trace_event_set_t *set, int how);
22
24 The posix_trace_get_filter() function shall retrieve, into the argument
25 pointed to by set, the actual trace event filter from the trace stream
26 specified by trid.
27
28 The posix_trace_set_filter() function shall change the set of filtered
29 trace event types after a trace stream identified by the trid argument
30 is created. This function may be called prior to starting the trace
31 stream, or while the trace stream is active. By default, if no call is
32 made to posix_trace_set_filter(), all trace events shall be recorded
33 (that is, none of the trace event types are filtered out).
34
35 If this function is called while the trace is in progress, a special
36 system trace event, POSIX_TRACE_FILTER, shall be recorded in the trace
37 indicating both the old and the new sets of filtered trace event types
38 (see Table 2-4, Trace and Trace Event Filter Options: System Trace
39 Events and Table 2-6, Trace, Trace Log, and Trace Event Filter Options:
40 System Trace Events).
41
42 If the posix_trace_set_filter() function is interrupted by a signal, an
43 error shall be returned and the filter shall not be changed. In this
44 case, the state of the trace stream shall not be changed.
45
46 The value of the argument how indicates the manner in which the set is
47 to be changed and shall have one of the following values, as defined in
48 the <trace.h> header:
49
50 POSIX_TRACE_SET_EVENTSET
51 The resulting set of trace event types to be filtered shall be
52 the trace event type set pointed to by the argument set.
53
54 POSIX_TRACE_ADD_EVENTSET
55 The resulting set of trace event types to be filtered shall be
56 the union of the current set and the trace event type set pointed
57 to by the argument set.
58
59 POSIX_TRACE_SUB_EVENTSET
60 The resulting set of trace event types to be filtered shall be
61 all trace event types in the current set that are not in the set
62 pointed to by the argument set; that is, remove each element of
63 the specified set from the current filter.
64
66 Upon successful completion, these functions shall return a value of
67 zero. Otherwise, they shall return the corresponding error number.
68
69 The posix_trace_get_filter() function stores the set of filtered trace
70 event types in set, if successful.
71
73 These functions shall fail if:
74
75 EINVAL The value of the trid argument does not correspond to an active
76 trace stream or the value of the argument pointed to by set is
77 invalid.
78
79 EINTR The operation was interrupted by a signal.
80
81 The following sections are informative.
82
84 None.
85
87 None.
88
90 None.
91
93 The posix_trace_get_filter() and posix_trace_set_filter() functions may
94 be removed in a future version.
95
97 Table 2-4, Trace and Trace Event Filter Options: System Trace Events,
98 Table 2-6, Trace, Trace Log, and Trace Event Filter Options: System
99 Trace Events, posix_trace_eventset_add()
100
101 The Base Definitions volume of POSIX.1‐2008, <trace.h>
102
104 Portions of this text are reprinted and reproduced in electronic form
105 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
106 -- Portable Operating System Interface (POSIX), The Open Group Base
107 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
108 cal and Electronics Engineers, Inc and The Open Group. (This is
109 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
110 event of any discrepancy between this version and the original IEEE and
111 The Open Group Standard, the original IEEE and The Open Group Standard
112 is the referee document. The original Standard can be obtained online
113 at http://www.unix.org/online.html .
114
115 Any typographical or formatting errors that appear in this page are
116 most likely to have been introduced during the conversion of the source
117 files to man page format. To report such errors, see https://www.ker‐
118 nel.org/doc/man-pages/reporting_bugs.html .
119
120
121
122IEEE/The Open Group 2013 POSIX_TRACE_GET_FILTER(3P)