1POSIX_TRACE_ATTR_GETLOGSIZE(PPO)SIX Programmer's ManPuOaSlIX_TRACE_ATTR_GETLOGSIZE(P)
2
3
4

NAME

6       posix_trace_attr_getlogsize,           posix_trace_attr_getmaxdatasize,
7       posix_trace_attr_getmaxsystemeventsize,           posix_trace_attr_get‐
8       maxusereventsize, posix_trace_attr_getstreamsize, posix_trace_attr_set‐
9       logsize,  posix_trace_attr_setmaxdatasize,  posix_trace_attr_setstream‐
10       size - retrieve and set trace stream size attributes (TRACING)
11

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

146       None.
147

APPLICATION USAGE

149       None.
150

RATIONALE

152       None.
153

FUTURE DIRECTIONS

155       None.
156

SEE ALSO

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