|
Packit |
7cfc04 |
'\" et
|
|
Packit |
7cfc04 |
.TH POSIX_TRACE_CLOSE "3P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
|
Packit |
7cfc04 |
.SH PROLOG
|
|
Packit |
7cfc04 |
This manual page is part of the POSIX Programmer's Manual.
|
|
Packit |
7cfc04 |
The Linux implementation of this interface may differ (consult
|
|
Packit |
7cfc04 |
the corresponding Linux manual page for details of Linux behavior),
|
|
Packit |
7cfc04 |
or the interface may not be implemented on Linux.
|
|
Packit |
7cfc04 |
|
|
Packit |
7cfc04 |
.SH NAME
|
|
Packit |
7cfc04 |
posix_trace_close,
|
|
Packit |
7cfc04 |
posix_trace_open,
|
|
Packit |
7cfc04 |
posix_trace_rewind
|
|
Packit |
7cfc04 |
\(em trace log management
|
|
Packit |
7cfc04 |
(\fBTRACING\fP)
|
|
Packit |
7cfc04 |
.SH SYNOPSIS
|
|
Packit |
7cfc04 |
.LP
|
|
Packit |
7cfc04 |
.nf
|
|
Packit |
7cfc04 |
#include <trace.h>
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
int posix_trace_close(trace_id_t \fItrid\fP);
|
|
Packit |
7cfc04 |
int posix_trace_open(int \fIfile_desc\fP, trace_id_t *\fItrid\fP);
|
|
Packit |
7cfc04 |
int posix_trace_rewind(trace_id_t \fItrid\fP);
|
|
Packit |
7cfc04 |
.fi
|
|
Packit |
7cfc04 |
.SH DESCRIPTION
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIposix_trace_close\fR()
|
|
Packit |
7cfc04 |
function shall deallocate the trace log identifier indicated by
|
|
Packit |
7cfc04 |
.IR trid ,
|
|
Packit |
7cfc04 |
and all of its associated resources. If there is no valid trace log
|
|
Packit |
7cfc04 |
pointed to by the
|
|
Packit |
7cfc04 |
.IR trid ,
|
|
Packit |
7cfc04 |
this function shall fail.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIposix_trace_open\fR()
|
|
Packit |
7cfc04 |
function shall allocate the necessary resources and establish the
|
|
Packit |
7cfc04 |
connection between a trace log identified by the
|
|
Packit |
7cfc04 |
.IR file_desc
|
|
Packit |
7cfc04 |
argument and a trace stream identifier identified by the object pointed
|
|
Packit |
7cfc04 |
to by the
|
|
Packit |
7cfc04 |
.IR trid
|
|
Packit |
7cfc04 |
argument. The
|
|
Packit |
7cfc04 |
.IR file_desc
|
|
Packit |
7cfc04 |
argument should be a valid open file descriptor that corresponds to a
|
|
Packit |
7cfc04 |
trace log. The
|
|
Packit |
7cfc04 |
.IR file_desc
|
|
Packit |
7cfc04 |
argument shall be open for reading. The current trace event timestamp,
|
|
Packit |
7cfc04 |
which specifies the timestamp of the trace event that will be read by
|
|
Packit |
7cfc04 |
the next call to
|
|
Packit |
7cfc04 |
\fIposix_trace_getnext_event\fR(),
|
|
Packit |
7cfc04 |
shall be set to the timestamp of the oldest trace event recorded in the
|
|
Packit |
7cfc04 |
trace log identified by
|
|
Packit |
7cfc04 |
.IR trid .
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIposix_trace_open\fR()
|
|
Packit |
7cfc04 |
function shall return a trace stream identifier in the variable
|
|
Packit |
7cfc04 |
pointed to by the
|
|
Packit |
7cfc04 |
.IR trid
|
|
Packit |
7cfc04 |
argument, that may only be used by the following functions:
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(!);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
T{
|
|
Packit |
7cfc04 |
.nf
|
|
Packit |
7cfc04 |
\fIposix_trace_close\fR()
|
|
Packit |
7cfc04 |
\fIposix_trace_eventid_equal\fR()
|
|
Packit |
7cfc04 |
\fIposix_trace_eventid_get_name\fR()
|
|
Packit |
7cfc04 |
\fIposix_trace_eventtypelist_getnext_id\fR()
|
|
Packit |
7cfc04 |
\fIposix_trace_eventtypelist_rewind\fR()
|
|
Packit |
7cfc04 |
T}!T{
|
|
Packit |
7cfc04 |
.nf
|
|
Packit |
7cfc04 |
\fIposix_trace_get_attr\fR()
|
|
Packit |
7cfc04 |
\fIposix_trace_get_status\fR()
|
|
Packit |
7cfc04 |
\fIposix_trace_getnext_event\fR()
|
|
Packit |
7cfc04 |
\fIposix_trace_rewind\fR()
|
|
Packit |
7cfc04 |
.fi
|
|
Packit |
7cfc04 |
T}
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
In particular, notice that the operations normally used by a trace
|
|
Packit |
7cfc04 |
controller process, such as
|
|
Packit |
7cfc04 |
\fIposix_trace_start\fR(),
|
|
Packit |
7cfc04 |
\fIposix_trace_stop\fR(),
|
|
Packit |
7cfc04 |
or
|
|
Packit |
7cfc04 |
\fIposix_trace_shutdown\fR(),
|
|
Packit |
7cfc04 |
cannot be invoked using the trace stream identifier returned by the
|
|
Packit |
7cfc04 |
\fIposix_trace_open\fR()
|
|
Packit |
7cfc04 |
function.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIposix_trace_rewind\fR()
|
|
Packit |
7cfc04 |
function shall reset the current trace event timestamp, which specifies
|
|
Packit |
7cfc04 |
the timestamp of the trace event that will be read by the next call to
|
|
Packit |
7cfc04 |
\fIposix_trace_getnext_event\fR(),
|
|
Packit |
7cfc04 |
to the timestamp of the oldest trace event recorded in the trace log
|
|
Packit |
7cfc04 |
identified by
|
|
Packit |
7cfc04 |
.IR trid .
|
|
Packit |
7cfc04 |
.SH "RETURN VALUE"
|
|
Packit |
7cfc04 |
Upon successful completion, these functions shall return a value of
|
|
Packit |
7cfc04 |
zero. Otherwise, they shall return the corresponding error number.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
If successful, the
|
|
Packit |
7cfc04 |
\fIposix_trace_open\fR()
|
|
Packit |
7cfc04 |
function stores the trace stream identifier value in the object pointed
|
|
Packit |
7cfc04 |
to by
|
|
Packit |
7cfc04 |
.IR trid .
|
|
Packit |
7cfc04 |
.SH ERRORS
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIposix_trace_open\fR()
|
|
Packit |
7cfc04 |
function shall fail if:
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR EINTR
|
|
Packit |
7cfc04 |
The operation was interrupted by a signal and thus no trace log was
|
|
Packit |
7cfc04 |
opened.
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR EINVAL
|
|
Packit |
7cfc04 |
The object pointed to by
|
|
Packit |
7cfc04 |
.IR file_desc
|
|
Packit |
7cfc04 |
does not correspond to a valid trace log.
|
|
Packit |
7cfc04 |
.br
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIposix_trace_close\fR()
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
\fIposix_trace_rewind\fR()
|
|
Packit |
7cfc04 |
functions may fail if:
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR EINVAL
|
|
Packit |
7cfc04 |
The object pointed to by
|
|
Packit |
7cfc04 |
.IR trid
|
|
Packit |
7cfc04 |
does not correspond to a valid trace log.
|
|
Packit |
7cfc04 |
.LP
|
|
Packit |
7cfc04 |
.IR "The following sections are informative."
|
|
Packit |
7cfc04 |
.SH EXAMPLES
|
|
Packit |
7cfc04 |
None.
|
|
Packit |
7cfc04 |
.SH "APPLICATION USAGE"
|
|
Packit |
7cfc04 |
None.
|
|
Packit |
7cfc04 |
.SH RATIONALE
|
|
Packit |
7cfc04 |
None.
|
|
Packit |
7cfc04 |
.SH "FUTURE DIRECTIONS"
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIposix_trace_close\fR(),
|
|
Packit |
7cfc04 |
\fIposix_trace_open\fR(),
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
\fIposix_trace_rewind\fR()
|
|
Packit |
7cfc04 |
functions may be removed in a future version.
|
|
Packit |
7cfc04 |
.SH "SEE ALSO"
|
|
Packit |
7cfc04 |
.ad l
|
|
Packit |
7cfc04 |
.IR "\fIposix_trace_get_attr\fR\^(\|)",
|
|
Packit |
7cfc04 |
.IR "\fIposix_trace_get_filter\fR\^(\|)",
|
|
Packit |
7cfc04 |
.IR "\fIposix_trace_getnext_event\fR\^(\|)"
|
|
Packit |
7cfc04 |
.ad b
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The Base Definitions volume of POSIX.1\(hy2008,
|
|
Packit |
7cfc04 |
.IR "\fB<trace.h>\fP"
|
|
Packit |
7cfc04 |
.SH COPYRIGHT
|
|
Packit |
7cfc04 |
Portions of this text are reprinted and reproduced in electronic form
|
|
Packit |
7cfc04 |
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
|
|
Packit |
7cfc04 |
-- Portable Operating System Interface (POSIX), The Open Group Base
|
|
Packit |
7cfc04 |
Specifications Issue 7, Copyright (C) 2013 by the Institute of
|
|
Packit |
7cfc04 |
Electrical and Electronics Engineers, Inc and The Open Group.
|
|
Packit |
7cfc04 |
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
|
|
Packit |
7cfc04 |
event of any discrepancy between this version and the original IEEE and
|
|
Packit |
7cfc04 |
The Open Group Standard, the original IEEE and The Open Group Standard
|
|
Packit |
7cfc04 |
is the referee document. The original Standard can be obtained online at
|
|
Packit |
7cfc04 |
http://www.unix.org/online.html .
|
|
Packit |
7cfc04 |
|
|
Packit |
7cfc04 |
Any typographical or formatting errors that appear
|
|
Packit |
7cfc04 |
in this page are most likely
|
|
Packit |
7cfc04 |
to have been introduced during the conversion of the source files to
|
|
Packit |
7cfc04 |
man page format. To report such errors, see
|
|
Packit |
7cfc04 |
https://www.kernel.org/doc/man-pages/reporting_bugs.html .
|