📄 posix_trace_attr_getmaxusereventsize.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-2004 IEEE and The Open Group, All Rights Reserved --><title>posix_trace_attr_getlogsize</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="posix_trace_attr_getlogsize"></a> <a name="tag_03_450"></a><!-- posix_trace_attr_getlogsize --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2004 Edition<br>Copyright © 2001-2004 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_03_450_01"></a>NAME</h4><blockquote>posix_trace_attr_getlogsize, posix_trace_attr_getmaxdatasize, posix_trace_attr_getmaxsystemeventsize,posix_trace_attr_getmaxusereventsize, posix_trace_attr_getstreamsize, posix_trace_attr_setlogsize, posix_trace_attr_setmaxdatasize,posix_trace_attr_setstreamsize - retrieve and set trace stream size attributes (<b>TRACING</b>)</blockquote><h4><a name="tag_03_450_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> #include <<a href="../basedefs/sys/types.h.html">sys/types.h</a>><br> #include <<a href="../basedefs/trace.h.html">trace.h</a>><br><br> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div><div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TRL')">TRC TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> int posix_trace_attr_getlogsize(const trace_attr_t *restrict</tt> <i>attr</i><tt>,<br> size_t *restrict</tt> <i>logsize</i><tt>);<br> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div><div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict</tt> <i>attr</i><tt>,<br> size_t *restrict</tt> <i>maxdatasize</i><tt>);<br> int posix_trace_attr_getmaxsystemeventsize(<br> const trace_attr_t *restrict</tt> <i>attr</i><tt>,<br> size_t *restrict</tt> <i>eventsize</i><tt>);<br> int posix_trace_attr_getmaxusereventsize(<br> const trace_attr_t *restrict</tt> <i>attr</i><tt>,<br> size_t</tt> <i>data_len</i><tt>, size_t *restrict</tt> <i>eventsize</i><tt>);<br> int posix_trace_attr_getstreamsize(const trace_attr_t *restrict</tt> <i>attr</i><tt>,<br> size_t *restrict</tt> <i>streamsize</i><tt>);<br> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div><div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TRL')">TRC TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> int posix_trace_attr_setlogsize(trace_attr_t *</tt><i>attr</i><tt>,<br> size_t</tt> <i>logsize</i><tt>);<br> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div><div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> int posix_trace_attr_setmaxdatasize(trace_attr_t *</tt><i>attr</i><tt>,<br> size_t</tt> <i>maxdatasize</i><tt>);<br> int posix_trace_attr_setstreamsize(trace_attr_t *</tt><i>attr</i><tt>,<br> size_t</tt> <i>streamsize</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_450_03"></a>DESCRIPTION</h4><blockquote><p><sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">The <i>posix_trace_attr_getlogsize</i>() function shall copy the log size, in bytes, from the <i>log-max-size</i> attribute of theattributes object pointed to by the <i>attr</i> argument into the variable pointed to by the <i>logsize</i> argument. This log sizeis the maximum total of bytes that shall be allocated for system and user trace events in the trace log. The default value for the<i>log-max-size</i> attribute is implementation-defined.</p><p>The <i>posix_trace_attr_setlogsize</i>() function shall set the maximum allowed size, in bytes, in the <i>log-max-size</i>attribute of the attributes object pointed to by the <i>attr</i> argument, using the size value supplied by the <i>logsize</i>argument.</p><p>The trace log size shall be used if the <i>log-full-policy</i> attribute is set to POSIX_TRACE_LOOP or POSIX_TRACE_UNTIL_FULL.If the <i>log-full-policy</i> attribute is set to POSIX_TRACE_APPEND, the implementation shall ignore the <i>log-max-size</i>attribute. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><p>The <i>posix_trace_attr_getmaxdatasize</i>() function shall copy the maximum user trace event data size, in bytes, from the<i>max-data-size</i> attribute of the attributes object pointed to by the <i>attr</i> argument into the variable pointed to by the<i>maxdatasize</i> argument. The default value for the <i>max-data-size</i> attribute is implementation-defined.</p><p>The <i>posix_trace_attr_getmaxsystemeventsize</i>() function shall calculate the maximum memory size, in bytes, required tostore a single system trace event. This value is calculated for the trace stream attributes object pointed to by the <i>attr</i>argument and is returned in the variable pointed to by the <i>eventsize</i> argument.</p><p>The values returned as the maximum memory sizes of the user and system trace events shall be such that if the sum of the maximummemory sizes of a set of the trace events that may be recorded in a trace stream is less than or equal to the<i>stream-min-size</i> attribute of that trace stream, the system provides the necessary resources for recording all those traceevents, without loss.</p><p>The <i>posix_trace_attr_getmaxusereventsize</i>() function shall calculate the maximum memory size, in bytes, required to storea single user trace event generated by a call to <a href="../functions/posix_trace_event.html"><i>posix_trace_event</i>()</a> witha <i>data_len</i> parameter equal to the <i>data_len</i> value specified in this call. This value is calculated for the tracestream attributes object pointed to by the <i>attr</i> argument and is returned in the variable pointed to by the <i>eventsize</i>argument.</p><p>The <i>posix_trace_attr_getstreamsize</i>() function shall copy the stream size, in bytes, from the <i>stream-min-size</i>attribute of the attributes object pointed to by the <i>attr</i> argument into the variable pointed to by the <i>streamsize</i>argument.</p><p>This stream size is the current total memory size reserved for system and user trace events in the trace stream. The defaultvalue for the <i>stream-min-size</i> attribute is implementation-defined. The stream size refers to memory used to store traceevent records. Other stream data (for example, trace attribute values) shall not be included in this size.</p><p>The <i>posix_trace_attr_setmaxdatasize</i>() function shall set the maximum allowed size, in bytes, in the <i>max-data-size</i>attribute of the attributes object pointed to by the <i>attr</i> argument, using the size value supplied by the <i>maxdatasize</i>argument. This maximum size is the maximum allowed size for the user data argument which may be passed to <a href="../functions/posix_trace_event.html"><i>posix_trace_event</i>()</a>. The implementation shall be allowed to truncate data passedto <i>trace_user_event</i> which is longer than <i>maxdatasize</i>.</p><p>The <i>posix_trace_attr_setstreamsize</i>() function shall set the minimum allowed size, in bytes, in the <i>stream-min-size</i>attribute of the attributes object pointed to by the <i>attr</i> argument, using the size value supplied by the <i>streamsize</i>argument.</p></blockquote><h4><a name="tag_03_450_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><sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">The <i>posix_trace_attr_getlogsize</i>() function stores the maximum trace log allowed size in the object pointed to by<i>logsize</i>, if successful. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><p>The <i>posix_trace_attr_getmaxdatasize</i>() function stores the maximum trace event record memory size in the object pointed toby <i>maxdatasize</i>, if successful.</p><p>The <i>posix_trace_attr_getmaxsystemeventsize</i>() function stores the maximum memory size to store a single system trace eventin the object pointed to by <i>eventsize</i>, if successful.</p><p>The <i>posix_trace_attr_getmaxusereventsize</i>() function stores the maximum memory size to store a single user trace event inthe object pointed to by <i>eventsize</i>, if successful.</p><p>The <i>posix_trace_attr_getstreamsize</i>() function stores the maximum trace stream allowed size in the object pointed to by<i>streamsize</i>, if successful.</p></blockquote><h4><a name="tag_03_450_05"></a>ERRORS</h4><blockquote><p>These functions may fail if:</p><dl compact><dt>[EINVAL]</dt><dd>The value specified by one of the arguments is invalid.</dd></dl></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_03_450_06"></a>EXAMPLES</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_450_07"></a>APPLICATION USAGE</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_450_08"></a>RATIONALE</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_450_09"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_450_10"></a>SEE ALSO</h4><blockquote><p><a href="posix_trace_attr_init.html"><i>posix_trace_attr_init</i>()</a>, <a href="posix_trace_create.html"><i>posix_trace_create</i>()</a>, <a href="posix_trace_event.html"><i>posix_trace_event</i>()</a>, <ahref="posix_trace_get_attr.html"><i>posix_trace_get_attr</i>()</a>, the Base Definitions volume of IEEE Std 1003.1-2001,<a href="../basedefs/sys/types.h.html"><i><sys/types.h></i></a>, <a href="../basedefs/trace.h.html"><i><trace.h></i></a></p></blockquote><h4><a name="tag_03_450_11"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 6. Derived from IEEE Std 1003.1q-2000.</p></blockquote><div class="box"><em>End of informative text.</em></div><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX ® is a registered Trademark of The Open Group.<br>POSIX ® 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 + -