# posix_trace_attr_getlogsize

## 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.
    


## NAME



           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 (**TRACING**)
    


## SYNOPSIS



           #include <sys/types.h>
           #include <trace.h>
    
           int posix_trace_attr_getlogsize(const trace_attr_t *restrict _attr_ ,
               size_t *restrict _logsize_);
           int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict _attr_ ,
               size_t *restrict _maxdatasize_);
           int posix_trace_attr_getmaxsystemeventsize(
               const trace_attr_t *restrict _attr_ ,
               size_t *restrict _eventsize_);
           int posix_trace_attr_getmaxusereventsize(
               const trace_attr_t *restrict _attr_ ,
               size_t _data_len_ , size_t *restrict _eventsize_);
           int posix_trace_attr_getstreamsize(const trace_attr_t *restrict _attr_ ,
               size_t *restrict _streamsize_);
           int posix_trace_attr_setlogsize(trace_attr_t *_attr_ ,
               size_t _logsize_);
           int posix_trace_attr_setmaxdatasize(trace_attr_t *_attr_ ,
               size_t _maxdatasize_);
           int posix_trace_attr_setstreamsize(trace_attr_t *_attr_ ,
               size_t _streamsize_);
    


## DESCRIPTION



           The  _posix_trace_attr_getlogsize_()  function  shall  copy  the log
           size, in bytes, from the _log-max-size_ attribute of the  attributes
           object  pointed  to by the _attr_ argument into the variable pointed
           to by the _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 _log-max-size_ attribute is
           implementation-defined.
    
           The _posix_trace_attr_setlogsize_() function shall set  the  maximum
           allowed  size,  in  bytes,  in  the  _log-max-size_ attribute of the
           attributes object pointed to by the _attr_ argument, using the  size
           value supplied by the _logsize_ argument.
    
           The  trace log size shall be used if the _log-full-policy_ attribute
           is set to POSIX_TRACE_LOOP or POSIX_TRACE_UNTIL_FULL. If the  _log-_
           _full-policy_   attribute   is   set   to   POSIX_TRACE_APPEND,  the
           implementation shall ignore the _log-max-size_ attribute.
    
           The  _posix_trace_attr_getmaxdatasize_()  function  shall  copy  the
           maximum  user  trace event data size, in bytes, from the _max-data-_
           _size_ attribute of the attributes object pointed  to  by  the  _attr_
           argument into the variable pointed to by the _maxdatasize_ argument.
           The   default   value   for   the   _max-data-size_   attribute   is
           implementation-defined.
    
           The   _posix_trace_attr_getmaxsystemeventsize_()   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 _attr_ argument and is
           returned in the variable pointed to by the _eventsize_ argument.
    
           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 _stream-min-size_
           attribute of that trace stream, the system provides the  necessary
           resources for recording all those trace events, without loss.
    
           The    _posix_trace_attr_getmaxusereventsize_()    function    shall
           calculate the maximum memory size, in bytes, required to  store  a
           single user trace event generated by a call to _posix_trace_event_()
           with a _data_len_ parameter equal to the _data_len_ value specified in
           this   call.  This  value  is  calculated  for  the  trace  stream
           attributes object pointed to by the _attr_ argument and is  returned
           in the variable pointed to by the _eventsize_ argument.
    
           The   _posix_trace_attr_getstreamsize_()  function  shall  copy  the
           stream size, in bytes, from the _stream-min-size_ attribute  of  the
           attributes  object  pointed  to  by  the  _attr_  argument  into the
           variable pointed to by the _streamsize_ argument.
    
           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 _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.
    
           The  _posix_trace_attr_setmaxdatasize_()  function  shall  set   the
           maximum  allowed size, in bytes, in the _max-data-size_ attribute of
           the attributes object pointed to by the _attr_ argument,  using  the
           size value supplied by the _maxdatasize_ argument. This maximum size
           is  the  maximum allowed size for the user data argument which may
           be passed to _posix_trace_event_().   The  implementation  shall  be
           allowed  to  truncate  data  passed  to  _trace_user_event_ which is
           longer than _maxdatasize_.
    
           The  _posix_trace_attr_setstreamsize_()  function  shall   set   the
           minimum  allowed  size, in bytes, in the _stream-min-size_ attribute
           of the attributes object pointed to by the  _attr_  argument,  using
           the size value supplied by the _streamsize_ argument.
    


## RETURN VALUE



           Upon  successful  completion, these functions shall return a value
           of zero. Otherwise, they  shall  return  the  corresponding  error
           number.
    
           The  _posix_trace_attr_getlogsize_()  function  stores  the  maximum
           trace log allowed size in the object pointed  to  by  _logsize_ ,  if
           successful.
    
           The  _posix_trace_attr_getmaxdatasize_() function stores the maximum
           trace event record  memory  size  in  the  object  pointed  to  by
           _maxdatasize_ , if successful.
    
           The  _posix_trace_attr_getmaxsystemeventsize_()  function stores the
           maximum memory size to store a single system trace  event  in  the
           object pointed to by _eventsize_ , if successful.
    
           The  _posix_trace_attr_getmaxusereventsize_()  function  stores  the
           maximum memory size to store a single  user  trace  event  in  the
           object pointed to by _eventsize_ , if successful.
    
           The  _posix_trace_attr_getstreamsize_()  function stores the maximum
           trace stream allowed size in the object pointed to by  _streamsize_ ,
           if successful.
    


## ERRORS



           These functions may fail if:
    
           **EINVAL** The value specified by one of the arguments is invalid.
    
           _The following sections are informative._
    


## EXAMPLES



           None.
    


## APPLICATION USAGE



           None.
    


## RATIONALE



           None.
    


## FUTURE DIRECTIONS



           The following functions:
    
                  _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_()
    
           may be removed in a future version.
    


* * *