Files
oldlinux-files/Ref-docs/POSIX/susv3/basedefs/trace.h.html
2024-02-19 00:21:47 -05:00

329 lines
17 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
<title>&lt;trace.h&gt;</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="&lt;trace.h&gt;"></a> <a name="tag_13_77"></a><!-- &lt;trace.h&gt; -->
<!--header start-->
<center><font size="2">The Open Group Base Specifications Issue 6<br>
IEEE Std 1003.1-2001<br>
Copyright &copy; 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
<!--header end-->
<hr size="2" noshade>
<h4><a name="tag_13_77_01"></a>NAME</h4>
<blockquote>trace.h - tracing</blockquote>
<h4><a name="tag_13_77_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<div class="box"><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt=
"[Option Start]" border="0"> #include &lt;trace.h&gt; <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></div>
</blockquote>
<h4><a name="tag_13_77_03"></a>DESCRIPTION</h4>
<blockquote>
<p>The <i>&lt;trace.h&gt;</i> header shall define the <b>posix_trace_event_info</b> structure that includes at least the following
members:</p>
<pre>
<tt>trace_event_id_t posix_event_id
pid_t posix_pid
void *posix_prog_address
int posix_truncation_status
struct timespec posix_timestamp
<sup>[<a href="javascript:open_code('THR')">THR</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
pthread_t posix_thread_id
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
</tt>
</pre>
<p>The <i>&lt;trace.h&gt;</i> header shall define the <b>posix_trace_status_info</b> structure that includes at least the following
members:</p>
<pre>
<tt>int posix_stream_status
int posix_stream_full_status
int posix_stream_overrun_status
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_stream_flush_status
int posix_stream_flush_error
int posix_log_overrun_status
int posix_log_full_status
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
</tt>
</pre>
<p>The <i>&lt;trace.h&gt;</i> header shall define the following symbols:</p>
<p><br>
POSIX_TRACE_ALL_EVENTS<br>
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>
POSIX_TRACE_APPEND<br>
<img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
<sup>[<a href="javascript:open_code('TRI')">TRI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>
POSIX_TRACE_CLOSE_FOR_CHILD<br>
<img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
<sup>[<a href="javascript:open_code('TEF')">TEF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>
POSIX_TRACE_FILTER<br>
<img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>
POSIX_TRACE_FLUSH<br>
POSIX_TRACE_FLUSH_START<br>
POSIX_TRACE_FLUSH_STOP<br>
POSIX_TRACE_FLUSHING<br>
<img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
POSIX_TRACE_FULL<br>
POSIX_TRACE_LOOP<br>
POSIX_TRACE_NO_OVERRUN<br>
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>
POSIX_TRACE_NOT_FLUSHING<br>
<img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
POSIX_TRACE_NOT_FULL<br>
<sup>[<a href="javascript:open_code('TRI')">TRI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>
POSIX_TRACE_INHERITED<br>
<img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
POSIX_TRACE_NOT_TRUNCATED<br>
POSIX_TRACE_OVERFLOW<br>
POSIX_TRACE_OVERRUN<br>
POSIX_TRACE_RESUME<br>
POSIX_TRACE_RUNNING<br>
POSIX_TRACE_START<br>
POSIX_TRACE_STOP<br>
POSIX_TRACE_SUSPENDED<br>
POSIX_TRACE_SYSTEM_EVENTS<br>
POSIX_TRACE_TRUNCATED_READ<br>
POSIX_TRACE_TRUNCATED_RECORD<br>
POSIX_TRACE_UNNAMED_USER_EVENT<br>
POSIX_TRACE_UNTIL_FULL<br>
POSIX_TRACE_WOPID_EVENTS<br>
</p>
<p>The following types shall be defined as described in <a href="sys/types.h.html"><i>&lt;sys/types.h&gt;</i></a> :</p>
<p><br>
<b>trace_attr_t</b><br>
<b>trace_id_t</b><br>
<b>trace_event_id_t</b><br>
<sup>[<a href="javascript:open_code('TEF')">TEF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>
<b>trace_event_set_t</b><br>
<img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
</p>
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
<pre>
<tt>int posix_trace_attr_destroy(trace_attr_t *);
int posix_trace_attr_getclockres(const trace_attr_t *,
struct timespec *);
int posix_trace_attr_getcreatetime(const trace_attr_t *,
struct timespec *);
int posix_trace_attr_getgenversion(const trace_attr_t *, char *);
<sup>[<a href="javascript:open_code('TRI')">TRI</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_attr_getinherited(const trace_attr_t *restrict,
int *restrict);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getlogsize(const trace_attr_t *restrict,
size_t *restrict);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxsystemeventsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxusereventsize(const trace_attr_t *restrict,
size_t, size_t *restrict);
int posix_trace_attr_getname(const trace_attr_t *, char *);
int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getstreamsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_init(trace_attr_t *);
<sup>[<a href="javascript:open_code('TRI')">TRI</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_attr_setinherited(trace_attr_t *, int);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_attr_setlogfullpolicy(trace_attr_t *, int);
int posix_trace_attr_setlogsize(trace_attr_t *, size_t);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
int posix_trace_attr_setmaxdatasize(trace_attr_t *, size_t);
int posix_trace_attr_setname(trace_attr_t *, const char *);
int posix_trace_attr_setstreamsize(trace_attr_t *, size_t);
int posix_trace_attr_setstreamfullpolicy(trace_attr_t *, int);
int posix_trace_clear(trace_id_t);
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_close(trace_id_t);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
int posix_trace_create(pid_t, const trace_attr_t *restrict,
trace_id_t *restrict);
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_create_withlog(pid_t, const trace_attr_t *restrict,
int, trace_id_t *restrict);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
void posix_trace_event(trace_event_id_t, const void *restrict, size_t);
int posix_trace_eventid_equal(trace_id_t, trace_event_id_t,
trace_event_id_t);
int posix_trace_eventid_get_name(trace_id_t, trace_event_id_t, char *);
int posix_trace_eventid_open(const char *restrict,
trace_event_id_t *restrict);
<sup>[<a href="javascript:open_code('TEF')">TEF</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_eventset_add(trace_event_id_t, trace_event_set_t *);
int posix_trace_eventset_del(trace_event_id_t, trace_event_set_t *);
int posix_trace_eventset_empty(trace_event_set_t *);
int posix_trace_eventset_fill(trace_event_set_t *, int);
int posix_trace_eventset_ismember(trace_event_id_t,
const trace_event_set_t *restrict, int *restrict);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
int posix_trace_eventtypelist_getnext_id(trace_id_t,
trace_event_id_t *restrict, int *restrict);
int posix_trace_eventtypelist_rewind(trace_id_t);
int posix_trace_flush(trace_id_t);
int posix_trace_get_attr(trace_id_t, trace_attr_t *);
<sup>[<a href="javascript:open_code('TEF')">TEF</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_get_filter(trace_id_t, trace_event_set_t *);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
int posix_trace_get_status(trace_id_t,
struct posix_trace_status_info *);
int posix_trace_getnext_event(trace_id_t,
struct posix_trace_event_info *restrict , void *restrict,
size_t, size_t *restrict, int *restrict);
<sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_open(int, trace_id_t *);
int posix_trace_rewind(trace_id_t);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
<sup>[<a href="javascript:open_code('TEF')">TEF</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_set_filter(trace_id_t, const trace_event_set_t *, int);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
int posix_trace_shutdown(trace_id_t);
int posix_trace_start(trace_id_t);
int posix_trace_stop(trace_id_t);
<sup>[<a href="javascript:open_code('TMO')">TMO</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_timedgetnext_event(trace_id_t,
struct posix_trace_event_info *restrict, void *restrict,
size_t, size_t *restrict, int *restrict,
const struct timespec *restrict);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
<sup>[<a href="javascript:open_code('TEF')">TEF</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int posix_trace_trid_eventid_open(trace_id_t, const char *restrict,
trace_event_id_t *restrict);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
int posix_trace_trygetnext_event(trace_id_t,
struct posix_trace_event_info *restrict, void *restrict, size_t,
size_t *restrict, int *restrict);
</tt>
</pre>
</blockquote>
<hr>
<div class="box"><em>The following sections are informative.</em></div>
<h4><a name="tag_13_77_04"></a>APPLICATION USAGE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_13_77_05"></a>RATIONALE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_13_77_06"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_13_77_07"></a>SEE ALSO</h4>
<blockquote>
<p><a href="sys/types.h.html"><i>&lt;sys/types.h&gt;</i></a> , the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a
href="../functions/xsh_chap02_11.html">Section 2.11, Tracing</a>, <a href=
"../functions/posix_trace_attr_destroy.html"><i>posix_trace_attr_destroy</i>()</a>, <a href=
"../functions/posix_trace_attr_getclockres.html"><i>posix_trace_attr_getclockres</i>()</a>, <a href=
"../functions/posix_trace_attr_getcreatetime.html"><i>posix_trace_attr_getcreatetime</i>()</a>, <a href=
"../functions/posix_trace_attr_getgenversion.html"><i>posix_trace_attr_getgenversion</i>()</a>, <a href=
"../functions/posix_trace_attr_getinherited.html"><i>posix_trace_attr_getinherited</i>()</a>, <a href=
"../functions/posix_trace_attr_getlogfullpolicy.html"><i>posix_trace_attr_getlogfullpolicy</i>()</a>, <a href=
"../functions/posix_trace_attr_getlogsize.html"><i>posix_trace_attr_getlogsize</i>()</a>, <a href=
"../functions/posix_trace_attr_getmaxdatasize.html"><i>posix_trace_attr_getmaxdatasize</i>()</a>, <a href=
"../functions/posix_trace_attr_getmaxsystemeventsize.html"><i>posix_trace_attr_getmaxsystemeventsize</i>()</a>, <a href=
"../functions/posix_trace_attr_getmaxusereventsize.html"><i>posix_trace_attr_getmaxusereventsize</i>()</a>, <a href=
"../functions/posix_trace_attr_getname.html"><i>posix_trace_attr_getname</i>()</a>, <a href=
"../functions/posix_trace_attr_getstreamfullpolicy.html"><i>posix_trace_attr_getstreamfullpolicy</i>()</a>, <a href=
"../functions/posix_trace_attr_getstreamsize.html"><i>posix_trace_attr_getstreamsize</i>()</a>, <a href=
"../functions/posix_trace_attr_init.html"><i>posix_trace_attr_init</i>()</a>, <a href=
"../functions/posix_trace_attr_setinherited.html"><i>posix_trace_attr_setinherited</i>()</a>, <a href=
"../functions/posix_trace_attr_setlogfullpolicy.html"><i>posix_trace_attr_setlogfullpolicy</i>()</a>, <a href=
"../functions/posix_trace_attr_setlogsize.html"><i>posix_trace_attr_setlogsize</i>()</a>, <a href=
"../functions/posix_trace_attr_setmaxdatasize.html"><i>posix_trace_attr_setmaxdatasize</i>()</a>, <a href=
"../functions/posix_trace_attr_setname.html"><i>posix_trace_attr_setname</i>()</a>, <a href=
"../functions/posix_trace_attr_setstreamsize.html"><i>posix_trace_attr_setstreamsize</i>()</a>, <a href=
"../functions/posix_trace_attr_setstreamfullpolicy.html"><i>posix_trace_attr_setstreamfullpolicy</i>()</a>, <a href=
"../functions/posix_trace_clear.html"><i>posix_trace_clear</i>()</a>, <a href=
"../functions/posix_trace_close.html"><i>posix_trace_close</i>()</a>, <a href=
"../functions/posix_trace_create.html"><i>posix_trace_create</i>()</a>, <a href=
"../functions/posix_trace_create_withlog.html"><i>posix_trace_create_withlog</i>()</a>, <a href=
"../functions/posix_trace_event.html"><i>posix_trace_event</i>()</a>, <a href=
"../functions/posix_trace_eventid_equal.html"><i>posix_trace_eventid_equal</i>()</a>, <a href=
"../functions/posix_trace_eventid_get_name.html"><i>posix_trace_eventid_get_name</i>()</a>, <a href=
"../functions/posix_trace_eventid_open.html"><i>posix_trace_eventid_open</i>()</a>, <a href=
"../functions/posix_trace_eventtypelist_getnext_id.html"><i>posix_trace_eventtypelist_getnext_id</i>()</a>, <a href=
"../functions/posix_trace_eventtypelist_rewind.html"><i>posix_trace_eventtypelist_rewind</i>()</a>, <a href=
"../functions/posix_trace_eventset_add.html"><i>posix_trace_eventset_add</i>()</a>, <a href=
"../functions/posix_trace_eventset_del.html"><i>posix_trace_eventset_del</i>()</a>, <a href=
"../functions/posix_trace_eventset_empty.html"><i>posix_trace_eventset_empty</i>()</a>, <a href=
"../functions/posix_trace_eventset_fill.html"><i>posix_trace_eventset_fill</i>()</a>, <a href=
"../functions/posix_trace_eventset_ismember.html"><i>posix_trace_eventset_ismember</i>()</a>, <a href=
"../functions/posix_trace_flush.html"><i>posix_trace_flush</i>()</a>, <a href=
"../functions/posix_trace_get_attr.html"><i>posix_trace_get_attr</i>()</a>, <a href=
"../functions/posix_trace_get_filter.html"><i>posix_trace_get_filter</i>()</a>, <a href=
"../functions/posix_trace_get_status.html"><i>posix_trace_get_status</i>()</a>, <a href=
"../functions/posix_trace_getnext_event.html"><i>posix_trace_getnext_event</i>()</a>, <a href=
"../functions/posix_trace_open.html"><i>posix_trace_open</i>()</a>, <a href=
"../functions/posix_trace_rewind.html"><i>posix_trace_rewind</i>()</a>, <a href=
"../functions/posix_trace_set_filter.html"><i>posix_trace_set_filter</i>()</a>, <a href=
"../functions/posix_trace_shutdown.html"><i>posix_trace_shutdown</i>()</a>, <a href=
"../functions/posix_trace_start.html"><i>posix_trace_start</i>()</a>, <a href=
"../functions/posix_trace_stop.html"><i>posix_trace_stop</i>()</a>, <a href=
"../functions/posix_trace_timedgetnext_event.html"><i>posix_trace_timedgetnext_event</i>()</a>, <a href=
"../functions/posix_trace_trid_eventid_open.html"><i>posix_trace_trid_eventid_open</i>()</a>, <a href=
"../functions/posix_trace_trygetnext_event.html"><i>posix_trace_trygetnext_event</i>()</a></p>
</blockquote>
<h4><a name="tag_13_77_08"></a>CHANGE HISTORY</h4>
<blockquote>
<p>First released in Issue 6. Derived from IEEE&nbsp;Std&nbsp;1003.1q-2000.</p>
</blockquote>
<div class="box"><em>End of informative text.</em></div>
<hr>
<hr size="2" noshade>
<center><font size="2"><!--footer start-->
UNIX &reg; is a registered Trademark of The Open Group.<br>
POSIX &reg; is a registered Trademark of The IEEE.<br>
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
]</font></center>
<!--footer end-->
<hr size="2" noshade>
</body>
</html>