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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

144       These functions may fail if:
145
146       EINVAL The value specified by one of the arguments is invalid.
147
148
149       The following sections are informative.
150

EXAMPLES

152       None.
153

APPLICATION USAGE

155       None.
156

RATIONALE

158       None.
159

FUTURE DIRECTIONS

161       None.
162

SEE ALSO

164       posix_trace_attr_init(),   posix_trace_create(),   posix_trace_event(),
165       posix_trace_get_attr(),    the    Base    Definitions     volume     of
166       IEEE Std 1003.1-2001, <sys/types.h>, <trace.h>
167
169       Portions  of  this text are reprinted and reproduced in electronic form
170       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
171       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
172       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
173       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
174       event of any discrepancy between this version and the original IEEE and
175       The  Open Group Standard, the original IEEE and The Open Group Standard
176       is the referee document. The original Standard can be  obtained  online
177       at http://www.opengroup.org/unix/online.html .
178
179
180
181IEEE/The Open Group                  2003      POSIX_TRACE_ATTR_GETLOGSIZE(3P)
Impressum