1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
|
'\" et
.TH POSIX_TRACE_ATTR_GETLOGSIZE "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\"
.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
.ad l
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
\(em retrieve and set trace stream size attributes
(\fBTRACING\fP)
.ad b
.SH SYNOPSIS
.LP
.nf
#include <sys/types.h>
#include <trace.h>
.P
int posix_trace_attr_getlogsize(const trace_attr_t *restrict \fIattr\fP,
size_t *restrict \fIlogsize\fP);
int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict \fIattr\fP,
size_t *restrict \fImaxdatasize\fP);
int posix_trace_attr_getmaxsystemeventsize(
const trace_attr_t *restrict \fIattr\fP,
size_t *restrict \fIeventsize\fP);
int posix_trace_attr_getmaxusereventsize(
const trace_attr_t *restrict \fIattr\fP,
size_t \fIdata_len\fP, size_t *restrict \fIeventsize\fP);
int posix_trace_attr_getstreamsize(const trace_attr_t *restrict \fIattr\fP,
size_t *restrict \fIstreamsize\fP);
int posix_trace_attr_setlogsize(trace_attr_t *\fIattr\fP,
size_t \fIlogsize\fP);
int posix_trace_attr_setmaxdatasize(trace_attr_t *\fIattr\fP,
size_t \fImaxdatasize\fP);
int posix_trace_attr_setstreamsize(trace_attr_t *\fIattr\fP,
size_t \fIstreamsize\fP);
.fi
.SH DESCRIPTION
The
\fIposix_trace_attr_getlogsize\fR()
function shall copy the log size, in bytes, from the
.IR log-max-size
attribute of the attributes object pointed to by the
.IR attr
argument into the variable pointed to by the
.IR logsize
argument. This log size is the maximum total of bytes that shall be
allocated for system and user trace events in the trace log. The
default value for the
.IR log-max-size
attribute is implementation-defined.
.P
The
\fIposix_trace_attr_setlogsize\fR()
function shall set the maximum allowed size, in bytes, in the
.IR log-max-size
attribute of the attributes object pointed to by the
.IR attr
argument, using the size value supplied by the
.IR logsize
argument.
.P
The trace log size shall be used if the
.IR log-full-policy
attribute is set to POSIX_TRACE_LOOP or POSIX_TRACE_UNTIL_FULL. If the
.IR log-full-policy
attribute is set to POSIX_TRACE_APPEND, the implementation shall ignore
the
.IR log-max-size
attribute.
.P
The
\fIposix_trace_attr_getmaxdatasize\fR()
function shall copy the maximum user trace event data size, in bytes,
from the
.IR max-data-size
attribute of the attributes object pointed to by the
.IR attr
argument into the variable pointed to by the
.IR maxdatasize
argument. The default value for the
.IR max-data-size
attribute is implementation-defined.
.P
The
\fIposix_trace_attr_getmaxsystemeventsize\fR()
function shall calculate the maximum memory size, in bytes, required to
store a single system trace event. This value is calculated for the
trace stream attributes object pointed to by the
.IR attr
argument and is returned in the variable pointed to by the
.IR eventsize
argument.
.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 maximum memory sizes
of a set of the trace events that may be recorded in a trace stream is
less than or equal to the
.IR stream-min-size
attribute of that trace stream, the system provides the necessary
resources for recording all those trace events, without loss.
.P
The
\fIposix_trace_attr_getmaxusereventsize\fR()
function shall calculate the maximum memory size, in bytes, required to
store a single user trace event generated by a call to
\fIposix_trace_event\fR()
with a
.IR data_len
parameter equal to the
.IR data_len
value specified in this call. This value is calculated for the trace
stream attributes object pointed to by the
.IR attr
argument and is returned in the variable pointed to by the
.IR eventsize
argument.
.P
The
\fIposix_trace_attr_getstreamsize\fR()
function shall copy the stream size, in bytes, from the
.IR stream-min-size
attribute of the attributes object pointed to by the
.IR attr
argument into the variable pointed to by the
.IR streamsize
argument.
.P
This stream size is the current total memory size reserved for system
and user trace events in the trace stream. The default value for the
.IR stream-min-size
attribute is implementation-defined. The stream size refers to memory
used to store trace event records. Other stream data (for example,
trace attribute values) shall not be included in this size.
.P
The
\fIposix_trace_attr_setmaxdatasize\fR()
function shall set the maximum allowed size, in bytes, in the
.IR max-data-size
attribute of the attributes object pointed to by the
.IR attr
argument, using the size value supplied by the
.IR maxdatasize
argument. This maximum size is the maximum allowed size for the user
data argument which may be passed to
\fIposix_trace_event\fR().
The implementation shall be allowed to truncate data passed to
.IR trace_user_event
which is longer than
.IR maxdatasize .
.P
The
\fIposix_trace_attr_setstreamsize\fR()
function shall set the minimum allowed size, in bytes, in the
.IR stream-min-size
attribute of the attributes object pointed to by the
.IR attr
argument, using the size value supplied by the
.IR streamsize
argument.
.SH "RETURN VALUE"
Upon successful completion, these functions shall return a value of
zero. Otherwise, they shall return the corresponding error number.
.P
The
\fIposix_trace_attr_getlogsize\fR()
function stores the maximum trace log allowed size in the object
pointed to by
.IR logsize ,
if successful.
.P
The
\fIposix_trace_attr_getmaxdatasize\fR()
function stores the maximum trace event record memory size in the
object pointed to by
.IR maxdatasize ,
if successful.
.P
The
\fIposix_trace_attr_getmaxsystemeventsize\fR()
function stores the maximum memory size to store a single system trace
event in the object pointed to by
.IR eventsize ,
if successful.
.P
The
\fIposix_trace_attr_getmaxusereventsize\fR()
function stores the maximum memory size to store a single user trace
event in the object pointed to by
.IR eventsize ,
if successful.
.P
The
\fIposix_trace_attr_getstreamsize\fR()
function stores the maximum trace stream allowed size in the object
pointed to by
.IR streamsize ,
if successful.
.SH ERRORS
These functions may fail if:
.TP
.BR EINVAL
The value specified by one of the arguments is invalid.
.LP
.IR "The following sections are informative."
.SH EXAMPLES
None.
.SH "APPLICATION USAGE"
None.
.SH RATIONALE
None.
.SH "FUTURE DIRECTIONS"
The following functions:
.sp
.RS
.nf
\fIposix_trace_attr_getlogsize\fR()
\fIposix_trace_attr_getmaxdatasize\fR()
\fIposix_trace_attr_getmaxsystemeventsize\fR()
\fIposix_trace_attr_getmaxusereventsize\fR()
\fIposix_trace_attr_getstreamsize\fR()
\fIposix_trace_attr_setlogsize\fR()
\fIposix_trace_attr_setmaxdatasize\fR()
\fIposix_trace_attr_setstreamsize\fR()
.fi
.RE
.P
may be removed in a future version.
.SH "SEE ALSO"
.ad l
.IR "\fIposix_trace_attr_destroy\fR\^(\|)",
.IR "\fIposix_trace_create\fR\^(\|)",
.IR "\fIposix_trace_event\fR\^(\|)",
.IR "\fIposix_trace_get_attr\fR\^(\|)"
.ad b
.P
The Base Definitions volume of POSIX.1\(hy2017,
.IR "\fB<sys_types.h>\fP",
.IR "\fB<trace.h>\fP"
.\"
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1-2017, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 7, 2018 Edition,
Copyright (C) 2018 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 .
.PP
Any typographical or formatting errors that appear
in this page are most likely
to have been introduced during the conversion of the source files to
man page format. To report such errors, see
https://www.kernel.org/doc/man-pages/reporting_bugs.html .
|