1POSIX_TRACE_ATTR_GETLOGSIZE(P3OPS)IX Programmer's MaPnOuSaIlX_TRACE_ATTR_GETLOGSIZE(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       posix_trace_attr_getlogsize, posix_trace_attr_getmaxdatasize,
14       posix_trace_attr_getmaxsystemeventsize, posix_trace_attr_get‐
15       maxusereventsize, posix_trace_attr_getstreamsize, posix_trace_attr_set‐
16       logsize, posix_trace_attr_setmaxdatasize, posix_trace_attr_setstream‐
17       size — retrieve and set trace stream size attributes (TRACING)
18

SYNOPSIS

20       #include <sys/types.h>
21       #include <trace.h>
22
23       int posix_trace_attr_getlogsize(const trace_attr_t *restrict attr,
24           size_t *restrict logsize);
25       int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict attr,
26           size_t *restrict maxdatasize);
27       int posix_trace_attr_getmaxsystemeventsize(
28           const trace_attr_t *restrict attr,
29           size_t *restrict eventsize);
30       int posix_trace_attr_getmaxusereventsize(
31           const trace_attr_t *restrict attr,
32           size_t data_len, size_t *restrict eventsize);
33       int posix_trace_attr_getstreamsize(const trace_attr_t *restrict attr,
34           size_t *restrict streamsize);
35       int posix_trace_attr_setlogsize(trace_attr_t *attr,
36           size_t logsize);
37       int posix_trace_attr_setmaxdatasize(trace_attr_t *attr,
38           size_t maxdatasize);
39       int posix_trace_attr_setstreamsize(trace_attr_t *attr,
40           size_t streamsize);
41

DESCRIPTION

43       The posix_trace_attr_getlogsize() function shall copy the log size,  in
44       bytes, from the log-max-size attribute of the attributes object pointed
45       to by the attr argument into the variable pointed  to  by  the  logsize
46       argument.  This  log  size  is the maximum total of bytes that shall be
47       allocated for system and user  trace  events  in  the  trace  log.  The
48       default value for the log-max-size attribute is implementation-defined.
49
50       The   posix_trace_attr_setlogsize()  function  shall  set  the  maximum
51       allowed size, in bytes, in the log-max-size attribute of the attributes
52       object  pointed  to by the attr argument, using the size value supplied
53       by the logsize argument.
54
55       The trace log size shall be used if the  log-full-policy  attribute  is
56       set to POSIX_TRACE_LOOP or POSIX_TRACE_UNTIL_FULL. If the log-full-pol‐
57       icy attribute is set to POSIX_TRACE_APPEND,  the  implementation  shall
58       ignore the log-max-size attribute.
59
60       The  posix_trace_attr_getmaxdatasize()  function shall copy the maximum
61       user trace event data size, in bytes, from the max-data-size  attribute
62       of the attributes object pointed to by the attr argument into the vari‐
63       able pointed to by the maxdatasize argument. The default value for  the
64       max-data-size attribute is implementation-defined.
65
66       The  posix_trace_attr_getmaxsystemeventsize()  function shall calculate
67       the maximum memory size, in bytes, required to store  a  single  system
68       trace  event.  This value is calculated for the trace stream attributes
69       object pointed to by the attr argument and is returned in the  variable
70       pointed to by the eventsize argument.
71
72       The  values returned as the maximum memory sizes of the user and system
73       trace events shall be such that if the sum of the maximum memory  sizes
74       of  a set of the trace events that may be recorded in a trace stream is
75       less than or equal to  the  stream-min-size  attribute  of  that  trace
76       stream,  the  system provides the necessary resources for recording all
77       those trace events, without loss.
78
79       The posix_trace_attr_getmaxusereventsize() function shall calculate the
80       maximum  memory  size,  in bytes, required to store a single user trace
81       event generated by a call to posix_trace_event() with a data_len param‐
82       eter  equal to the data_len value specified in this call. This value is
83       calculated for the trace stream attributes object  pointed  to  by  the
84       attr  argument and is returned in the variable pointed to by the event‐
85       size argument.
86
87       The posix_trace_attr_getstreamsize() function  shall  copy  the  stream
88       size,  in  bytes,  from the stream-min-size attribute of the attributes
89       object pointed to by the attr argument into the variable pointed to  by
90       the streamsize argument.
91
92       This  stream  size is the current total memory size reserved for system
93       and user trace events in the trace stream. The default  value  for  the
94       stream-min-size  attribute  is  implementation-defined. The stream size
95       refers to memory used to store trace event records. Other  stream  data
96       (for  example,  trace  attribute  values) shall not be included in this
97       size.
98
99       The posix_trace_attr_setmaxdatasize() function shall  set  the  maximum
100       allowed   size,  in  bytes,  in  the  max-data-size  attribute  of  the
101       attributes object pointed to by the attr argument, using the size value
102       supplied  by the maxdatasize argument. This maximum size is the maximum
103       allowed size for  the  user  data  argument  which  may  be  passed  to
104       posix_trace_event().   The  implementation shall be allowed to truncate
105       data passed to trace_user_event which is longer than maxdatasize.
106
107       The posix_trace_attr_setstreamsize() function  shall  set  the  minimum
108       allowed  size,  in  bytes,  in  the  stream-min-size  attribute  of the
109       attributes object pointed to by the attr argument, using the size value
110       supplied by the streamsize argument.
111

RETURN VALUE

113       Upon  successful  completion,  these  functions shall return a value of
114       zero. Otherwise, they shall return the corresponding error number.
115
116       The posix_trace_attr_getlogsize() function stores the maximum trace log
117       allowed size in the object pointed to by logsize, if successful.
118
119       The posix_trace_attr_getmaxdatasize() function stores the maximum trace
120       event record memory size in the object pointed to  by  maxdatasize,  if
121       successful.
122
123       The  posix_trace_attr_getmaxsystemeventsize() function stores the maxi‐
124       mum memory size to store a single system  trace  event  in  the  object
125       pointed to by eventsize, if successful.
126
127       The  posix_trace_attr_getmaxusereventsize() function stores the maximum
128       memory size to store a single user trace event in the object pointed to
129       by eventsize, if successful.
130
131       The  posix_trace_attr_getstreamsize() function stores the maximum trace
132       stream allowed size in the object pointed to by streamsize, if success‐
133       ful.
134

ERRORS

136       These functions may fail if:
137
138       EINVAL The value specified by one of the arguments is invalid.
139
140       The following sections are informative.
141

EXAMPLES

143       None.
144

APPLICATION USAGE

146       None.
147

RATIONALE

149       None.
150

FUTURE DIRECTIONS

152       The following functions:
153
154              posix_trace_attr_getlogsize()
155              posix_trace_attr_getmaxdatasize()
156              posix_trace_attr_getmaxsystemeventsize()
157              posix_trace_attr_getmaxusereventsize()
158              posix_trace_attr_getstreamsize()
159              posix_trace_attr_setlogsize()
160              posix_trace_attr_setmaxdatasize()
161              posix_trace_attr_setstreamsize()
162
163       may be removed in a future version.
164

SEE ALSO

166       posix_trace_attr_destroy(), posix_trace_create(), posix_trace_event(),
167       posix_trace_get_attr()
168
169       The Base Definitions volume of POSIX.1‐2008, <sys_types.h>, <trace.h>
170
172       Portions of this text are reprinted and reproduced in  electronic  form
173       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
174       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
175       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
176       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
177       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
178       event of any discrepancy between this version and the original IEEE and
179       The  Open Group Standard, the original IEEE and The Open Group Standard
180       is the referee document. The original Standard can be  obtained  online
181       at http://www.unix.org/online.html .
182
183       Any  typographical  or  formatting  errors that appear in this page are
184       most likely to have been introduced during the conversion of the source
185       files  to  man page format. To report such errors, see https://www.ker
186       nel.org/doc/man-pages/reporting_bugs.html .
187
188
189
190IEEE/The Open Group                  2013      POSIX_TRACE_ATTR_GETLOGSIZE(3P)
Impressum