⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 posix_trace_set_filter.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 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-2003 The Open Group, All Rights Reserved --><title>posix_trace_get_filter</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="posix_trace_get_filter"></a> <a name="tag_03_470"></a><!-- posix_trace_get_filter --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright &copy; 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_03_470_01"></a>NAME</h4><blockquote>posix_trace_get_filter, posix_trace_set_filter - retrieve and set the filter of an initialized trace stream(<b>TRACING</b>)</blockquote><h4><a name="tag_03_470_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TEF')">TRC TEF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> #include &lt;<a href="../basedefs/trace.h.html">trace.h</a>&gt;<br><br> int posix_trace_get_filter(trace_id_t</tt> <i>trid</i><tt>, trace_event_set_t *</tt><i>set</i><tt>);<br> int posix_trace_set_filter(trace_id_t</tt> <i>trid</i><tt>,<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const trace_event_set_t *</tt><i>set</i><tt>, int</tt> <i>how</i><tt>); <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div><tt><br></tt></blockquote><h4><a name="tag_03_470_03"></a>DESCRIPTION</h4><blockquote><p>The <i>posix_trace_get_filter</i>() function shall retrieve, into the argument pointed to by <i>set</i>, the actual trace eventfilter from the trace stream specified by <i>trid</i>.</p><p>The <i>posix_trace_set_filter</i>() function shall change the set of filtered trace event types after a trace stream identifiedby the <i>trid</i> argument is created. This function may be called prior to starting the trace stream, or while the trace streamis active. By default, if no call is made to <i>posix_trace_set_filter</i>(), all trace events shall be recorded (that is, none ofthe trace event types are filtered out).</p><p>If this function is called while the trace is in progress, a special system trace event, POSIX_TRACE_FILTER, shall be recordedin the trace indicating both the old and the new sets of filtered trace event types (see <a href="xsh_chap02_11.html#tagtcjh_4"><i>Trace and Trace Event Filter Options: System Trace Events</i></a> and <a href="xsh_chap02_11.html#tagtcjh_6"><i>Trace, Trace Log, and Trace Event Filter Options: System Trace Events</i></a> ).</p><p>If the <i>posix_trace_set_filter</i>() function is interrupted by a signal, an error shall be returned and the filter shall notbe changed. In this case, the state of the trace stream shall not be changed.</p><p>The value of the argument <i>how</i> indicates the manner in which the set is to be changed and shall have one of the followingvalues, as defined in the <a href="../basedefs/trace.h.html"><i>&lt;trace.h&gt;</i></a> header:</p><dl compact><dt>POSIX_TRACE_SET_EVENTSET</dt><dd><br>The resulting set of trace event types to be filtered shall be the trace event type set pointed to by the argument <i>set</i>.</dd><dt>POSIX_TRACE_ADD_EVENTSET</dt><dd><br>The resulting set of trace event types to be filtered shall be the union of the current set and the trace event type set pointed toby the argument <i>set</i>.</dd><dt>POSIX_TRACE_SUB_EVENTSET</dt><dd><br>The resulting set of trace event types to be filtered shall be all trace event types in the current set that are not in the setpointed to by the argument <i>set</i>; that is, remove each element of the specified set from the current filter.</dd></dl></blockquote><h4><a name="tag_03_470_04"></a>RETURN VALUE</h4><blockquote><p>Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding errornumber.</p><p>The <i>posix_trace_get_filter</i>() function stores the set of filtered trace event types in <i>set</i>, if successful.</p></blockquote><h4><a name="tag_03_470_05"></a>ERRORS</h4><blockquote><p>These functions shall fail if:</p><dl compact><dt>[EINVAL]</dt><dd>The value of the <i>trid</i> argument does not correspond to an active trace stream or the value of the argument pointed to by<i>set</i> is invalid.</dd><dt>[EINTR]</dt><dd>The operation was interrupted by a signal.</dd></dl></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_03_470_06"></a>EXAMPLES</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_470_07"></a>APPLICATION USAGE</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_470_08"></a>RATIONALE</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_470_09"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_470_10"></a>SEE ALSO</h4><blockquote><p><a href="xsh_chap02_11.html#tagtcjh_4"><i>Trace and Trace Event Filter Options: System Trace Events</i></a> , <a href="xsh_chap02_11.html#tagtcjh_6"><i>Trace, Trace Log, and Trace Event Filter Options: System Trace Events</i></a> , <a href="posix_trace_eventset_add.html"><i>posix_trace_eventset_add</i>()</a> , the Base Definitions volume ofIEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/trace.h.html"><i>&lt;trace.h&gt;</i></a></p></blockquote><h4><a name="tag_03_470_11"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 6. Derived from IEEE&nbsp;Std&nbsp;1003.1q-2000.</p><p>IEEE PASC Interpretation 1003.1 #123 is applied.</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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -