trace.h(3)                 POSIX Programmer's Manual                trace.h(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
       trace.h -- tracing

SSYYNNOOPPSSIISS
       #include <trace.h>

DDEESSCCRRIIPPTTIIOONN
       The _<_t_r_a_c_e_._h_> header shall define the ppoossiixx__ttrraaccee__eevveenntt__iinnffoo structure,
       which shall include at least the following members:


           trace_event_id_t  posix_event_id
           pid_t             posix_pid
           void             *posix_prog_address
           pthread_t         posix_thread_id
           struct timespec   posix_timestamp
           int               posix_truncation_status

       The _<_t_r_a_c_e_._h_> header shall define the ppoossiixx__ttrraaccee__ssttaattuuss__iinnffoo
       structure, which shall include at least the following members:


           int     posix_stream_full_status
           int     posix_stream_overrun_status
           int     posix_stream_status
           int     posix_log_full_status
           int     posix_log_overrun_status
           int     posix_stream_flush_error
           int     posix_stream_flush_status

       The _<_t_r_a_c_e_._h_> header shall define the following symbolic constants:

       POSIX_TRACE_ALL_EVENTS
       POSIX_TRACE_APPEND
       POSIX_TRACE_CLOSE_FOR_CHILD
       POSIX_TRACE_FILTER
       POSIX_TRACE_FLUSH
       POSIX_TRACE_FLUSH_START
       POSIX_TRACE_FLUSH_STOP
       POSIX_TRACE_FLUSHING
       POSIX_TRACE_FULL
       POSIX_TRACE_LOOP
       POSIX_TRACE_NO_OVERRUN
       POSIX_TRACE_NOT_FLUSHING
       POSIX_TRACE_NOT_FULL
       POSIX_TRACE_INHERITED
       POSIX_TRACE_NOT_TRUNCATED
       POSIX_TRACE_OVERFLOW
       POSIX_TRACE_OVERRUN
       POSIX_TRACE_RESUME
       POSIX_TRACE_RUNNING
       POSIX_TRACE_START
       POSIX_TRACE_STOP
       POSIX_TRACE_SUSPENDED
       POSIX_TRACE_SYSTEM_EVENTS
       POSIX_TRACE_TRUNCATED_READ
       POSIX_TRACE_TRUNCATED_RECORD
       POSIX_TRACE_UNNAMED_USER_EVENT
       POSIX_TRACE_UNTIL_FULL
       POSIX_TRACE_WOPID_EVENTS

       The _<_t_r_a_c_e_._h_> header shall define the ssiizzee__tt, ttrraaccee__aattttrr__tt,
       ttrraaccee__eevveenntt__iidd__tt, ttrraaccee__eevveenntt__sseett__tt, and ttrraaccee__iidd__tt types as described
       in _<_s_y_s_/_t_y_p_e_s_._h_>.

       The following shall be declared as functions and may also be defined as
       macros. Function prototypes shall be provided.


           int  posix_trace_attr_destroy(trace_attr_t *);
           int  posix_trace_attr_getclockres(const trace_attr_t *,
                    struct timespec *);
           int  posix_trace_attr_getcreatetime(const trace_attr_t *,
                    struct timespec *);
           int  posix_trace_attr_getgenversion(const trace_attr_t *, char *);
           int  posix_trace_attr_getinherited(const trace_attr_t *restrict,
                    int *restrict);
           int  posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict,
                    int *restrict);
           int  posix_trace_attr_getlogsize(const trace_attr_t *restrict,
                    size_t *restrict);
           int  posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict,
                    size_t *restrict);
           int  posix_trace_attr_getmaxsystemeventsize(const trace_attr_t *restrict,
                    size_t *restrict);
           int  posix_trace_attr_getmaxusereventsize(const trace_attr_t *restrict,
                    size_t, size_t *restrict);
           int  posix_trace_attr_getname(const trace_attr_t *, char *);
           int  posix_trace_attr_getstreamfullpolicy(const trace_attr_t *restrict,
                    int *restrict);
           int  posix_trace_attr_getstreamsize(const trace_attr_t *restrict,
                    size_t *restrict);
           int  posix_trace_attr_init(trace_attr_t *);
           int  posix_trace_attr_setinherited(trace_attr_t *, int);
           int  posix_trace_attr_setlogfullpolicy(trace_attr_t *, int);
           int  posix_trace_attr_setlogsize(trace_attr_t *, size_t);
           int  posix_trace_attr_setmaxdatasize(trace_attr_t *, size_t);
           int  posix_trace_attr_setname(trace_attr_t *, const char *);
           int  posix_trace_attr_setstreamfullpolicy(trace_attr_t *, int);
           int  posix_trace_attr_setstreamsize(trace_attr_t *, size_t);
           int  posix_trace_clear(trace_id_t);
           int  posix_trace_close(trace_id_t);
           int  posix_trace_create(pid_t, const trace_attr_t *restrict,
                    trace_id_t *restrict);
           int  posix_trace_create_withlog(pid_t, const trace_attr_t *restrict,
                    int, trace_id_t *restrict);
           void posix_trace_event(trace_event_id_t, const void *restrict, size_t);
           int  posix_trace_eventid_equal(trace_id_t, trace_event_id_t,
                    trace_event_id_t);
           int  posix_trace_eventid_get_name(trace_id_t, trace_event_id_t, char *);
           int  posix_trace_eventid_open(const char *restrict,
                    trace_event_id_t *restrict);
           int  posix_trace_eventset_add(trace_event_id_t, trace_event_set_t *);
           int  posix_trace_eventset_del(trace_event_id_t, trace_event_set_t *);
           int  posix_trace_eventset_empty(trace_event_set_t *);
           int  posix_trace_eventset_fill(trace_event_set_t *, int);
           int  posix_trace_eventset_ismember(trace_event_id_t,
                    const trace_event_set_t *restrict, int *restrict);
           int  posix_trace_eventtypelist_getnext_id(trace_id_t,
                    trace_event_id_t *restrict, int *restrict);
           int  posix_trace_eventtypelist_rewind(trace_id_t);
           int  posix_trace_flush(trace_id_t);
           int  posix_trace_get_attr(trace_id_t, trace_attr_t *);
           int  posix_trace_get_filter(trace_id_t, trace_event_set_t *);
           int  posix_trace_get_status(trace_id_t,
                    struct posix_trace_status_info *);
           int  posix_trace_getnext_event(trace_id_t,
                    struct posix_trace_event_info *restrict, void *restrict,
                    size_t, size_t *restrict, int *restrict);
           int  posix_trace_open(int, trace_id_t *);
           int  posix_trace_rewind(trace_id_t);
           int  posix_trace_set_filter(trace_id_t, const trace_event_set_t *, int);
           int  posix_trace_shutdown(trace_id_t);
           int  posix_trace_start(trace_id_t);
           int  posix_trace_stop(trace_id_t);
           int  posix_trace_timedgetnext_event(trace_id_t,
                    struct posix_trace_event_info *restrict, void *restrict,
                    size_t, size_t *restrict, int *restrict,
                    const struct timespec *restrict);
           int  posix_trace_trid_eventid_open(trace_id_t, const char *restrict,
                    trace_event_id_t *restrict);
           int  posix_trace_trygetnext_event(trace_id_t,
                    struct posix_trace_event_info *restrict, void *restrict, size_t,
                    size_t *restrict, int *restrict);

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

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       The _<_t_r_a_c_e_._h_> header may be removed in a future version.

SSEEEE AALLSSOO
       <<ssyyss__ttyyppeess..hh>>

       The System Interfaces volume of POSIX.1-2017, _S_e_c_t_i_o_n _2_._1_1, _T_r_a_c_i_n_g,
       _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___a_t_t_r___g_e_t_c_l_o_c_k_r_e_s(),
       _p_o_s_i_x___t_r_a_c_e___a_t_t_r___g_e_t_i_n_h_e_r_i_t_e_d(), _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___c_l_e_a_r(), _p_o_s_i_x___t_r_a_c_e___c_l_o_s_e(), _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___e_v_e_n_t_i_d___e_q_u_a_l(),
       _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_s_e_t___a_d_d(), _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_t_y_p_e_l_i_s_t___g_e_t_n_e_x_t___i_d(),
       _p_o_s_i_x___t_r_a_c_e___g_e_t___a_t_t_r(), _p_o_s_i_x___t_r_a_c_e___g_e_t___f_i_l_t_e_r(),
       _p_o_s_i_x___t_r_a_c_e___g_e_t_n_e_x_t___e_v_e_n_t(), _p_o_s_i_x___t_r_a_c_e___s_t_a_r_t()

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                           trace.h(3)
