POSIX_TRACE_ATTR_GETLOGSIZE(P3O)SIX Programmer's ManPuOaSlIX_TRACE_ATTR_GETLOGSIZE(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       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 (TTRRAACCIINNGG)

SSYYNNOOPPSSIISS
       #include <sys/types.h>
       #include <trace.h>

       int posix_trace_attr_getlogsize(const trace_attr_t *restrict _a_t_t_r,
           size_t *restrict _l_o_g_s_i_z_e);
       int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict _a_t_t_r,
           size_t *restrict _m_a_x_d_a_t_a_s_i_z_e);
       int posix_trace_attr_getmaxsystemeventsize(
           const trace_attr_t *restrict _a_t_t_r,
           size_t *restrict _e_v_e_n_t_s_i_z_e);
       int posix_trace_attr_getmaxusereventsize(
           const trace_attr_t *restrict _a_t_t_r,
           size_t _d_a_t_a___l_e_n, size_t *restrict _e_v_e_n_t_s_i_z_e);
       int posix_trace_attr_getstreamsize(const trace_attr_t *restrict _a_t_t_r,
           size_t *restrict _s_t_r_e_a_m_s_i_z_e);
       int posix_trace_attr_setlogsize(trace_attr_t *_a_t_t_r,
           size_t _l_o_g_s_i_z_e);
       int posix_trace_attr_setmaxdatasize(trace_attr_t *_a_t_t_r,
           size_t _m_a_x_d_a_t_a_s_i_z_e);
       int posix_trace_attr_setstreamsize(trace_attr_t *_a_t_t_r,
           size_t _s_t_r_e_a_m_s_i_z_e);

DDEESSCCRRIIPPTTIIOONN
       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_l_o_g_s_i_z_e() function shall copy the log size, in
       bytes, from the _l_o_g_-_m_a_x_-_s_i_z_e attribute of the attributes object pointed
       to by the _a_t_t_r argument into the variable pointed to by the _l_o_g_s_i_z_e
       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 _l_o_g_-_m_a_x_-_s_i_z_e attribute is implementation-defined.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___s_e_t_l_o_g_s_i_z_e() function shall set the maximum
       allowed size, in bytes, in the _l_o_g_-_m_a_x_-_s_i_z_e attribute of the attributes
       object pointed to by the _a_t_t_r argument, using the size value supplied
       by the _l_o_g_s_i_z_e argument.

       The trace log size shall be used if the _l_o_g_-_f_u_l_l_-_p_o_l_i_c_y attribute is
       set to POSIX_TRACE_LOOP or POSIX_TRACE_UNTIL_FULL. If the _l_o_g_-_f_u_l_l_-
       _p_o_l_i_c_y attribute is set to POSIX_TRACE_APPEND, the implementation shall
       ignore the _l_o_g_-_m_a_x_-_s_i_z_e attribute.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_d_a_t_a_s_i_z_e() function shall copy the maximum
       user trace event data size, in bytes, from the _m_a_x_-_d_a_t_a_-_s_i_z_e attribute
       of the attributes object pointed to by the _a_t_t_r argument into the
       variable pointed to by the _m_a_x_d_a_t_a_s_i_z_e argument. The default value for
       the _m_a_x_-_d_a_t_a_-_s_i_z_e attribute is implementation-defined.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_s_y_s_t_e_m_e_v_e_n_t_s_i_z_e() 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 _a_t_t_r argument and is returned in the variable
       pointed to by the _e_v_e_n_t_s_i_z_e 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 _s_t_r_e_a_m_-_m_i_n_-_s_i_z_e attribute of that trace
       stream, the system provides the necessary resources for recording all
       those trace events, without loss.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_u_s_e_r_e_v_e_n_t_s_i_z_e() function shall calculate the
       maximum memory size, in bytes, required to store a single user trace
       event generated by a call to _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t() with a _d_a_t_a___l_e_n
       parameter equal to the _d_a_t_a___l_e_n value specified in this call. This
       value is calculated for the trace stream attributes object pointed to
       by the _a_t_t_r argument and is returned in the variable pointed to by the
       _e_v_e_n_t_s_i_z_e argument.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_s_t_r_e_a_m_s_i_z_e() function shall copy the stream
       size, in bytes, from the _s_t_r_e_a_m_-_m_i_n_-_s_i_z_e attribute of the attributes
       object pointed to by the _a_t_t_r argument into the variable pointed to by
       the _s_t_r_e_a_m_s_i_z_e 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
       _s_t_r_e_a_m_-_m_i_n_-_s_i_z_e 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 _p_o_s_i_x___t_r_a_c_e___a_t_t_r___s_e_t_m_a_x_d_a_t_a_s_i_z_e() function shall set the maximum
       allowed size, in bytes, in the _m_a_x_-_d_a_t_a_-_s_i_z_e attribute of the
       attributes object pointed to by the _a_t_t_r argument, using the size value
       supplied by the _m_a_x_d_a_t_a_s_i_z_e argument. This maximum size is the maximum
       allowed size for the user data argument which may be passed to
       _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t().  The implementation shall be allowed to truncate
       data passed to _t_r_a_c_e___u_s_e_r___e_v_e_n_t which is longer than _m_a_x_d_a_t_a_s_i_z_e.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___s_e_t_s_t_r_e_a_m_s_i_z_e() function shall set the minimum
       allowed size, in bytes, in the _s_t_r_e_a_m_-_m_i_n_-_s_i_z_e attribute of the
       attributes object pointed to by the _a_t_t_r argument, using the size value
       supplied by the _s_t_r_e_a_m_s_i_z_e argument.

RREETTUURRNN VVAALLUUEE
       Upon successful completion, these functions shall return a value of
       zero. Otherwise, they shall return the corresponding error number.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_l_o_g_s_i_z_e() function stores the maximum trace log
       allowed size in the object pointed to by _l_o_g_s_i_z_e, if successful.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_d_a_t_a_s_i_z_e() function stores the maximum trace
       event record memory size in the object pointed to by _m_a_x_d_a_t_a_s_i_z_e, if
       successful.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_s_y_s_t_e_m_e_v_e_n_t_s_i_z_e() function stores the
       maximum memory size to store a single system trace event in the object
       pointed to by _e_v_e_n_t_s_i_z_e, if successful.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_u_s_e_r_e_v_e_n_t_s_i_z_e() function stores the maximum
       memory size to store a single user trace event in the object pointed to
       by _e_v_e_n_t_s_i_z_e, if successful.

       The _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_s_t_r_e_a_m_s_i_z_e() function stores the maximum trace
       stream allowed size in the object pointed to by _s_t_r_e_a_m_s_i_z_e, if
       successful.

EERRRROORRSS
       These functions may fail if:

       EEIINNVVAALL The value specified by one of the arguments is invalid.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       The following functions:

              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_l_o_g_s_i_z_e()
              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_d_a_t_a_s_i_z_e()
              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_s_y_s_t_e_m_e_v_e_n_t_s_i_z_e()
              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_m_a_x_u_s_e_r_e_v_e_n_t_s_i_z_e()
              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_s_t_r_e_a_m_s_i_z_e()
              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___s_e_t_l_o_g_s_i_z_e()
              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___s_e_t_m_a_x_d_a_t_a_s_i_z_e()
              _p_o_s_i_x___t_r_a_c_e___a_t_t_r___s_e_t_s_t_r_e_a_m_s_i_z_e()

       may be removed in a future version.

SSEEEE AALLSSOO
       _p_o_s_i_x___t_r_a_c_e___a_t_t_r___d_e_s_t_r_o_y(), _p_o_s_i_x___t_r_a_c_e___c_r_e_a_t_e(), _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t(),
       _p_o_s_i_x___t_r_a_c_e___g_e_t___a_t_t_r()

       The Base Definitions volume of POSIX.1-2017, <<ssyyss__ttyyppeess..hh>>, <<ttrraaccee..hh>>

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

       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 .



IEEE/The Open Group                  2017       POSIX_TRACE_ATTR_GETLOGSIZE(3)
