1POSIX_TRACE_CLEAR(3P) POSIX Programmer's Manual POSIX_TRACE_CLEAR(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_clear — clear trace stream and trace log (TRACING)
14
16 #include <sys/types.h>
17 #include <trace.h>
18
19 int posix_trace_clear(trace_id_t trid);
20
22 The posix_trace_clear() function shall reinitialize the trace stream
23 identified by the argument trid as if it were returning from the
24 posix_trace_create() function, except that the same allocated resources
25 shall be reused, the mapping of trace event type identifiers to trace
26 event names shall be unchanged, and the trace stream status shall
27 remain unchanged (that is, if it was running, it remains running and if
28 it was suspended, it remains suspended).
29
30 All trace events in the trace stream recorded before the call to
31 posix_trace_clear() shall be lost. The posix_stream_full_status status
32 shall be set to POSIX_TRACE_NOT_FULL. There is no guarantee that all
33 trace events that occurred during the posix_trace_clear() call are
34 recorded; the behavior with respect to trace points that may occur dur‐
35 ing this call is unspecified.
36
37 If the Trace Log option is supported and the trace stream has been cre‐
38 ated with a log, the posix_trace_clear() function shall reinitialize
39 the trace stream with the same behavior as if the trace stream was cre‐
40 ated without the log, plus it shall reinitialize the trace log associ‐
41 ated with the trace stream identified by the argument trid as if it
42 were returning from the posix_trace_create_withlog() function, except
43 that the same allocated resources, for the trace log, may be reused and
44 the associated trace stream status remains unchanged. The first trace
45 event recorded in the trace log after the call to posix_trace_clear()
46 shall be the same as the first trace event recorded in the active trace
47 stream after the call to posix_trace_clear(). The posix_log_full_sta‐
48 tus status shall be set to POSIX_TRACE_NOT_FULL. There is no guarantee
49 that all trace events that occurred during the posix_trace_clear() call
50 are recorded in the trace log; the behavior with respect to trace
51 points that may occur during this call is unspecified. If the log full
52 policy is POSIX_TRACE_APPEND, the effect of a call to this function is
53 unspecified for the trace log associated with the trace stream identi‐
54 fied by the trid argument.
55
57 Upon successful completion, the posix_trace_clear() function shall
58 return a value of zero. Otherwise, it shall return the corresponding
59 error number.
60
62 The posix_trace_clear() function shall fail if:
63
64 EINVAL The value of the trid argument does not correspond to an active
65 trace stream.
66
67 The following sections are informative.
68
70 None.
71
73 None.
74
76 None.
77
79 The posix_trace_clear() function may be removed in a future version.
80
82 posix_trace_attr_destroy(), posix_trace_create(),
83 posix_trace_get_attr()
84
85 The Base Definitions volume of POSIX.1‐2008, <sys_types.h>, <trace.h>
86
88 Portions of this text are reprinted and reproduced in electronic form
89 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
90 -- Portable Operating System Interface (POSIX), The Open Group Base
91 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
92 cal and Electronics Engineers, Inc and The Open Group. (This is
93 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
94 event of any discrepancy between this version and the original IEEE and
95 The Open Group Standard, the original IEEE and The Open Group Standard
96 is the referee document. The original Standard can be obtained online
97 at http://www.unix.org/online.html .
98
99 Any typographical or formatting errors that appear in this page are
100 most likely to have been introduced during the conversion of the source
101 files to man page format. To report such errors, see https://www.ker‐
102 nel.org/doc/man-pages/reporting_bugs.html .
103
104
105
106IEEE/The Open Group 2013 POSIX_TRACE_CLEAR(3P)