diff options
Diffstat (limited to 'man-pages-posix-2003/man3p/posix_trace_open.3p')
-rw-r--r-- | man-pages-posix-2003/man3p/posix_trace_open.3p | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/man-pages-posix-2003/man3p/posix_trace_open.3p b/man-pages-posix-2003/man3p/posix_trace_open.3p new file mode 100644 index 0000000..a72f2b1 --- /dev/null +++ b/man-pages-posix-2003/man3p/posix_trace_open.3p @@ -0,0 +1,144 @@ +.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved +.TH "POSIX_TRACE_CLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" +.\" posix_trace_close +.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_close, posix_trace_open, posix_trace_rewind \- trace log +management (\fBTRACING\fP) +.SH SYNOPSIS +.LP +\fB#include <trace.h> +.br +.sp +int posix_trace_close(trace_id_t\fP \fItrid\fP\fB); +.br +int posix_trace_open(int\fP \fIfile_desc\fP\fB, trace_id_t *\fP\fItrid\fP\fB); +.br +int posix_trace_rewind(trace_id_t\fP \fItrid\fP\fB); \fP +\fB +.br +\fP +.SH DESCRIPTION +.LP +The \fIposix_trace_close\fP() function shall deallocate the trace +log identifier indicated by \fItrid\fP, and all of its +associated resources. If there is no valid trace log pointed to by +the \fItrid\fP, this function shall fail. +.LP +The \fIposix_trace_open\fP() function shall allocate the necessary +resources and establish the connection between a trace log +identified by the \fIfile_desc\fP argument and a trace stream identifier +identified by the object pointed to by the \fItrid\fP +argument. The \fIfile_desc\fP argument should be a valid open file +descriptor that corresponds to a trace log. The +\fIfile_desc\fP argument shall be open for reading. The current trace +event timestamp, which specifies the timestamp of the trace +event that will be read by the next call to \fIposix_trace_getnext_event\fP(), +shall be set to the timestamp of the oldest +trace event recorded in the trace log identified by \fItrid\fP. +.LP +The \fIposix_trace_open\fP() function shall return a trace stream +identifier in the variable pointed to by the \fItrid\fP +argument, that may only be used by the following functions: +.TS C +center; lw(39) lw(39). +T{ +.br +\fIposix_trace_close\fP() +.br +\fIposix_trace_eventid_equal\fP() +.br +\fIposix_trace_eventid_get_name\fP() +.br +\fIposix_trace_eventtypelist_getnext_id\fP() +.br +\fIposix_trace_eventtypelist_rewind\fP() +.br +\ +T} T{ +.br +\fIposix_trace_get_attr\fP() +.br +\fIposix_trace_get_status\fP() +.br +\fIposix_trace_getnext_event\fP() +.br +\fIposix_trace_rewind\fP() +.br +\ +T} +.TE +.LP +In particular, notice that the operations normally used by a trace +controller process, such as \fIposix_trace_start\fP(), \fIposix_trace_stop\fP(), +or \fIposix_trace_shutdown\fP(), cannot be invoked using the trace +stream identifier +returned by the \fIposix_trace_open\fP() function. +.LP +The \fIposix_trace_rewind\fP() function shall reset the current trace +event timestamp, which specifies the timestamp of the +trace event that will be read by the next call to \fIposix_trace_getnext_event\fP(), +to the timestamp of the oldest trace event +recorded in the trace log identified by \fItrid\fP. +.SH RETURN VALUE +.LP +Upon successful completion, these functions shall return a value of +zero. Otherwise, they shall return the corresponding error +number. +.LP +If successful, the \fIposix_trace_open\fP() function stores the trace +stream identifier value in the object pointed to by +\fItrid\fP. +.SH ERRORS +.LP +The \fIposix_trace_open\fP() function shall fail if: +.TP 7 +.B EINTR +The operation was interrupted by a signal and thus no trace log was +opened. +.TP 7 +.B EINVAL +The object pointed to by \fIfile_desc\fP does not correspond to a +valid trace log. +.sp +.LP +The \fIposix_trace_close\fP() and \fIposix_trace_rewind\fP() functions +may fail if: +.TP 7 +.B EINVAL +The object pointed to by \fItrid\fP does not correspond to a valid +trace log. +.sp +.LP +\fIThe following sections are informative.\fP +.SH EXAMPLES +.LP +None. +.SH APPLICATION USAGE +.LP +None. +.SH RATIONALE +.LP +None. +.SH FUTURE DIRECTIONS +.LP +None. +.SH SEE ALSO +.LP +\fIposix_trace_get_attr\fP(), \fIposix_trace_get_filter\fP(), \fIposix_trace_getnext_event\fP(), +the Base Definitions volume of +IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP +.SH COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology +-- Portable Operating System Interface (POSIX), The Open Group Base +Specifications Issue 6, Copyright (C) 2001-2003 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 . |