1POSIX_TRACE_CLEAR(3P)      POSIX Programmer's Manual     POSIX_TRACE_CLEAR(3P)
2
3
4

PROLOG

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

NAME

12       posix_trace_clear — clear trace stream and trace log (TRACING)
13

SYNOPSIS

15       #include <sys/types.h>
16       #include <trace.h>
17
18       int posix_trace_clear(trace_id_t trid);
19

DESCRIPTION

21       The posix_trace_clear() function shall reinitialize  the  trace  stream
22       identified  by  the  argument  trid  as  if  it were returning from the
23       posix_trace_create() function, except that the same allocated resources
24       shall  be  reused, the mapping of trace event type identifiers to trace
25       event names shall be unchanged,  and  the  trace  stream  status  shall
26       remain unchanged (that is, if it was running, it remains running and if
27       it was suspended, it remains suspended).
28
29       All trace events in the  trace  stream  recorded  before  the  call  to
30       posix_trace_clear()  shall be lost. The posix_stream_full_status status
31       shall be set to POSIX_TRACE_NOT_FULL.  There is no guarantee  that  all
32       trace  events  that  occurred  during  the posix_trace_clear() call are
33       recorded; the behavior with respect to trace points that may occur dur‐
34       ing this call is unspecified.
35
36       If the Trace Log option is supported and the trace stream has been cre‐
37       ated with a log, the posix_trace_clear()  function  shall  reinitialize
38       the trace stream with the same behavior as if the trace stream was cre‐
39       ated without the log, plus it shall reinitialize the trace log  associ‐
40       ated  with  the  trace  stream identified by the argument trid as if it
41       were returning from the posix_trace_create_withlog()  function,  except
42       that the same allocated resources, for the trace log, may be reused and
43       the associated trace stream status remains unchanged.  The first  trace
44       event  recorded  in the trace log after the call to posix_trace_clear()
45       shall be the same as the first trace event recorded in the active trace
46       stream  after the call to posix_trace_clear().  The posix_log_full_sta‐
47       tus status shall be set to POSIX_TRACE_NOT_FULL. There is no  guarantee
48       that all trace events that occurred during the posix_trace_clear() call
49       are recorded in the trace log;  the  behavior  with  respect  to  trace
50       points  that may occur during this call is unspecified. If the log full
51       policy is POSIX_TRACE_APPEND, the effect of a call to this function  is
52       unspecified  for the trace log associated with the trace stream identi‐
53       fied by the trid argument.
54

RETURN VALUE

56       Upon successful  completion,  the  posix_trace_clear()  function  shall
57       return  a  value  of zero. Otherwise, it shall return the corresponding
58       error number.
59

ERRORS

61       The posix_trace_clear() function shall fail if:
62
63       EINVAL The value of the trid argument does not correspond to an  active
64              trace stream.
65
66       The following sections are informative.
67

EXAMPLES

69       None.
70

APPLICATION USAGE

72       None.
73

RATIONALE

75       None.
76

FUTURE DIRECTIONS

78       The posix_trace_clear() function may be removed in a future version.
79

SEE ALSO

81       posix_trace_attr_destroy(), posix_trace_create(),
82       posix_trace_get_attr()
83
84       The Base Definitions volume of POSIX.1‐2017, <sys_types.h>, <trace.h>
85
87       Portions of this text are reprinted and reproduced in  electronic  form
88       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
89       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
90       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
91       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
92       event of any discrepancy between this version and the original IEEE and
93       The Open Group Standard, the original IEEE and The Open Group  Standard
94       is  the  referee document. The original Standard can be obtained online
95       at http://www.opengroup.org/unix/online.html .
96
97       Any typographical or formatting errors that appear  in  this  page  are
98       most likely to have been introduced during the conversion of the source
99       files to man page format. To report such errors,  see  https://www.ker
100       nel.org/doc/man-pages/reporting_bugs.html .
101
102
103
104IEEE/The Open Group                  2017                POSIX_TRACE_CLEAR(3P)
Impressum