1<trace.h>(0P) POSIX Programmer's Manual <trace.h>(0P)
2
3
4
6 trace.h - tracing
7
9 #include <trace.h>
10
12 The <trace.h> header shall define the posix_trace_event_info structure
13 that includes at least the following members:
14
15
16 trace_event_id_t posix_event_id
17 pid_t posix_pid
18 void *posix_prog_address
19 int posix_truncation_status
20 struct timespec posix_timestamp
21
22 pthread_t posix_thread_id
23
24
25 The <trace.h> header shall define the posix_trace_status_info structure
26 that includes at least the following members:
27
28
29 int posix_stream_status
30 int posix_stream_full_status
31 int posix_stream_overrun_status
32
33 int posix_stream_flush_status
34 int posix_stream_flush_error
35 int posix_log_overrun_status
36 int posix_log_full_status
37
38
39 The <trace.h> header shall define the following symbols:
40
41 POSIX_TRACE_ALL_EVENTS
42
43 POSIX_TRACE_APPEND
44
45
46 POSIX_TRACE_CLOSE_FOR_CHILD
47
48
49 POSIX_TRACE_FILTER
50
51
52 POSIX_TRACE_FLUSH
53 POSIX_TRACE_FLUSH_START
54 POSIX_TRACE_FLUSH_STOP
55 POSIX_TRACE_FLUSHING
56
57 POSIX_TRACE_FULL
58 POSIX_TRACE_LOOP
59 POSIX_TRACE_NO_OVERRUN
60
61 POSIX_TRACE_NOT_FLUSHING
62
63 POSIX_TRACE_NOT_FULL
64
65 POSIX_TRACE_INHERITED
66
67 POSIX_TRACE_NOT_TRUNCATED
68 POSIX_TRACE_OVERFLOW
69 POSIX_TRACE_OVERRUN
70 POSIX_TRACE_RESUME
71 POSIX_TRACE_RUNNING
72 POSIX_TRACE_START
73 POSIX_TRACE_STOP
74 POSIX_TRACE_SUSPENDED
75 POSIX_TRACE_SYSTEM_EVENTS
76 POSIX_TRACE_TRUNCATED_READ
77 POSIX_TRACE_TRUNCATED_RECORD
78 POSIX_TRACE_UNNAMED_USER_EVENT
79 POSIX_TRACE_UNTIL_FULL
80 POSIX_TRACE_WOPID_EVENTS
81
82 The following types shall be defined as described in <sys/types.h> :
83
84 trace_attr_t
85 trace_id_t
86 trace_event_id_t
87
88 trace_event_set_t
89
90
91 The following shall be declared as functions and may also be defined as
92 macros. Function prototypes shall be provided.
93
94
95 int posix_trace_attr_destroy(trace_attr_t *);
96 int posix_trace_attr_getclockres(const trace_attr_t *,
97 struct timespec *);
98 int posix_trace_attr_getcreatetime(const trace_attr_t *,
99 struct timespec *);
100 int posix_trace_attr_getgenversion(const trace_attr_t *, char *);
101
102 int posix_trace_attr_getinherited(const trace_attr_t *restrict,
103 int *restrict);
104
105
106 int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict,
107 int *restrict);
108 int posix_trace_attr_getlogsize(const trace_attr_t *restrict,
109 size_t *restrict);
110
111 int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict,
112 size_t *restrict);
113 int posix_trace_attr_getmaxsystemeventsize(const trace_attr_t *restrict,
114 size_t *restrict);
115 int posix_trace_attr_getmaxusereventsize(const trace_attr_t *restrict,
116 size_t, size_t *restrict);
117 int posix_trace_attr_getname(const trace_attr_t *, char *);
118 int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *restrict,
119 int *restrict);
120 int posix_trace_attr_getstreamsize(const trace_attr_t *restrict,
121 size_t *restrict);
122 int posix_trace_attr_init(trace_attr_t *);
123
124 int posix_trace_attr_setinherited(trace_attr_t *, int);
125
126
127 int posix_trace_attr_setlogfullpolicy(trace_attr_t *, int);
128 int posix_trace_attr_setlogsize(trace_attr_t *, size_t);
129
130 int posix_trace_attr_setmaxdatasize(trace_attr_t *, size_t);
131 int posix_trace_attr_setname(trace_attr_t *, const char *);
132 int posix_trace_attr_setstreamsize(trace_attr_t *, size_t);
133 int posix_trace_attr_setstreamfullpolicy(trace_attr_t *, int);
134 int posix_trace_clear(trace_id_t);
135
136 int posix_trace_close(trace_id_t);
137
138 int posix_trace_create(pid_t, const trace_attr_t *restrict,
139 trace_id_t *restrict);
140
141 int posix_trace_create_withlog(pid_t, const trace_attr_t *restrict,
142 int, trace_id_t *restrict);
143
144 void posix_trace_event(trace_event_id_t, const void *restrict, size_t);
145 int posix_trace_eventid_equal(trace_id_t, trace_event_id_t,
146 trace_event_id_t);
147 int posix_trace_eventid_get_name(trace_id_t, trace_event_id_t, char *);
148 int posix_trace_eventid_open(const char *restrict,
149 trace_event_id_t *restrict);
150
151 int posix_trace_eventset_add(trace_event_id_t, trace_event_set_t *);
152 int posix_trace_eventset_del(trace_event_id_t, trace_event_set_t *);
153 int posix_trace_eventset_empty(trace_event_set_t *);
154 int posix_trace_eventset_fill(trace_event_set_t *, int);
155 int posix_trace_eventset_ismember(trace_event_id_t,
156 const trace_event_set_t *restrict, int *restrict);
157
158 int posix_trace_eventtypelist_getnext_id(trace_id_t,
159 trace_event_id_t *restrict, int *restrict);
160 int posix_trace_eventtypelist_rewind(trace_id_t);
161
162 int posix_trace_flush(trace_id_t);
163
164 int posix_trace_get_attr(trace_id_t, trace_attr_t *);
165
166 int posix_trace_get_filter(trace_id_t, trace_event_set_t *);
167
168 int posix_trace_get_status(trace_id_t,
169 struct posix_trace_status_info *);
170 int posix_trace_getnext_event(trace_id_t,
171 struct posix_trace_event_info *restrict, void *restrict,
172 size_t, size_t *restrict, int *restrict);
173
174 int posix_trace_open(int, trace_id_t *);
175 int posix_trace_rewind(trace_id_t);
176
177
178 int posix_trace_set_filter(trace_id_t, const trace_event_set_t *, int);
179
180 int posix_trace_shutdown(trace_id_t);
181 int posix_trace_start(trace_id_t);
182 int posix_trace_stop(trace_id_t);
183
184 int posix_trace_timedgetnext_event(trace_id_t,
185 struct posix_trace_event_info *restrict, void *restrict,
186 size_t, size_t *restrict, int *restrict,
187 const struct timespec *restrict);
188
189
190 int posix_trace_trid_eventid_open(trace_id_t, const char *restrict,
191 trace_event_id_t *restrict);
192
193 int posix_trace_trygetnext_event(trace_id_t,
194 struct posix_trace_event_info *restrict, void *restrict, size_t,
195 size_t *restrict, int *restrict);
196
197 The following sections are informative.
198
200 None.
201
203 None.
204
206 None.
207
209 <sys/types.h>, the System Interfaces volume of IEEE Std 1003.1-2001,
210 Section 2.11, Tracing, posix_trace_attr_destroy(),
211 posix_trace_attr_getclockres(), posix_trace_attr_getcreatetime(),
212 posix_trace_attr_getgenversion(), posix_trace_attr_getinherited(),
213 posix_trace_attr_getlogfullpolicy(), posix_trace_attr_getlogsize(),
214 posix_trace_attr_getmaxdatasize(), posix_trace_attr_getmaxsystemevent‐
215 size(), posix_trace_attr_getmaxusereventsize(), posix_trace_attr_get‐
216 name(), posix_trace_attr_getstreamfullpolicy(), posix_trace_attr_get‐
217 streamsize(), posix_trace_attr_init(), posix_trace_attr_setinherited(),
218 posix_trace_attr_setlogfullpolicy(), posix_trace_attr_setlogsize(),
219 posix_trace_attr_setmaxdatasize(), posix_trace_attr_setname(),
220 posix_trace_attr_setstreamsize(), posix_trace_attr_setstreamfullpol‐
221 icy(), posix_trace_clear(), posix_trace_close(), posix_trace_create(),
222 posix_trace_create_withlog(), posix_trace_event(), posix_trace_even‐
223 tid_equal(), posix_trace_eventid_get_name(), posix_trace_even‐
224 tid_open(), posix_trace_eventtypelist_getnext_id(), posix_trace_event‐
225 typelist_rewind(), posix_trace_eventset_add(),
226 posix_trace_eventset_del(), posix_trace_eventset_empty(),
227 posix_trace_eventset_fill(), posix_trace_eventset_ismember(),
228 posix_trace_flush(), posix_trace_get_attr(), posix_trace_get_filter(),
229 posix_trace_get_status(), posix_trace_getnext_event(),
230 posix_trace_open(), posix_trace_rewind(), posix_trace_set_filter(),
231 posix_trace_shutdown(), posix_trace_start(), posix_trace_stop(),
232 posix_trace_timedgetnext_event(), posix_trace_trid_eventid_open(),
233 posix_trace_trygetnext_event()
234
236 Portions of this text are reprinted and reproduced in electronic form
237 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
238 -- Portable Operating System Interface (POSIX), The Open Group Base
239 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
240 Electrical and Electronics Engineers, Inc and The Open Group. In the
241 event of any discrepancy between this version and the original IEEE and
242 The Open Group Standard, the original IEEE and The Open Group Standard
243 is the referee document. The original Standard can be obtained online
244 at http://www.opengroup.org/unix/online.html .
245
246
247
248IEEE/The Open Group 2003 <trace.h>(0P)