posix_trace_clear.3p (4367B)
- '\" et
- .TH POSIX_TRACE_CLEAR "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
- .\"
- .SH PROLOG
- This manual page is part of the POSIX Programmer's Manual.
- The Linux implementation of this interface may differ (consult
- the corresponding Linux manual page for details of Linux behavior),
- or the interface may not be implemented on Linux.
- .\"
- .SH NAME
- posix_trace_clear
- \(em clear trace stream and trace log
- (\fBTRACING\fP)
- .SH SYNOPSIS
- .LP
- .nf
- #include <sys/types.h>
- #include <trace.h>
- .P
- int posix_trace_clear(trace_id_t \fItrid\fP);
- .fi
- .SH DESCRIPTION
- The
- \fIposix_trace_clear\fR()
- function shall reinitialize the trace stream identified by the argument
- .IR trid
- as if it were returning from the
- \fIposix_trace_create\fR()
- function, except that the same allocated resources shall be reused, the
- mapping of trace event type identifiers to trace event names shall be
- unchanged, and the trace stream status shall remain unchanged (that is,
- if it was running, it remains running and if it was suspended, it
- remains suspended).
- .P
- All trace events in the trace stream recorded before the call to
- \fIposix_trace_clear\fR()
- shall be lost. The
- .IR posix_stream_full_status
- status shall be set to POSIX_TRACE_NOT_FULL.
- There is no guarantee that all trace events that occurred during the
- \fIposix_trace_clear\fR()
- call are recorded; the behavior with respect to trace points that may
- occur during this call is unspecified.
- .P
- If the Trace Log option is supported and the trace stream has been
- created with a log, the
- \fIposix_trace_clear\fR()
- function shall reinitialize the trace stream with the same behavior as
- if the trace stream was created without the log, plus it shall
- reinitialize the trace log associated with the trace stream identified
- by the argument
- .IR trid
- as if it were returning from the
- \fIposix_trace_create_withlog\fR()
- function, except that the same allocated resources, for the trace log,
- may be reused and the associated trace stream status remains unchanged.
- The first trace event recorded in the trace log after the call to
- \fIposix_trace_clear\fR()
- shall be the same as the first trace event recorded in the active trace
- stream after the call to
- \fIposix_trace_clear\fR().
- The
- .IR posix_log_full_status
- status shall be set to POSIX_TRACE_NOT_FULL. There is no guarantee
- that all trace events that occurred during the
- \fIposix_trace_clear\fR()
- call are recorded in the trace log; the behavior with respect to trace
- points that may occur during this call is unspecified. If the log full
- policy is POSIX_TRACE_APPEND, the effect of a call to this function is
- unspecified for the trace log associated with the trace stream
- identified by the
- .IR trid
- argument.
- .SH "RETURN VALUE"
- Upon successful completion, the
- \fIposix_trace_clear\fR()
- function shall return a value of zero. Otherwise, it shall return the
- corresponding error number.
- .SH ERRORS
- The
- \fIposix_trace_clear\fR()
- function shall fail if:
- .TP
- .BR EINVAL
- The value of the
- .IR trid
- argument does not correspond to an active trace stream.
- .LP
- .IR "The following sections are informative."
- .SH EXAMPLES
- None.
- .SH "APPLICATION USAGE"
- None.
- .SH RATIONALE
- None.
- .SH "FUTURE DIRECTIONS"
- The
- \fIposix_trace_clear\fR()
- function may be removed in a future version.
- .SH "SEE ALSO"
- .ad l
- .IR "\fIposix_trace_attr_destroy\fR\^(\|)",
- .IR "\fIposix_trace_create\fR\^(\|)",
- .IR "\fIposix_trace_get_attr\fR\^(\|)"
- .ad b
- .P
- The Base Definitions volume of POSIX.1\(hy2017,
- .IR "\fB<sys_types.h>\fP",
- .IR "\fB<trace.h>\fP"
- .\"
- .SH COPYRIGHT
- Portions of this text are reprinted and reproduced in electronic form
- from IEEE Std 1003.1-2017, Standard for Information Technology
- -- Portable Operating System Interface (POSIX), The Open Group Base
- Specifications Issue 7, 2018 Edition,
- Copyright (C) 2018 by the Institute of
- Electrical and Electronics Engineers, Inc and The Open Group.
- In the event of any discrepancy between this version and the original IEEE and
- The Open Group Standard, the original IEEE and The Open Group Standard
- is the referee document. The original Standard can be obtained online at
- http://www.opengroup.org/unix/online.html .
- .PP
- Any typographical or formatting errors that appear
- in this page are most likely
- to have been introduced during the conversion of the source files to
- man page format. To report such errors, see
- https://www.kernel.org/doc/man-pages/reporting_bugs.html .