POSIX_TRACE_GET_FILTER(3)  POSIX Programmer's Manual POSIX_TRACE_GET_FILTER(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_get_filter, posix_trace_set_filter -- retrieve and set the
       filter of an initialized trace stream (TTRRAACCIINNGG)

SSYYNNOOPPSSIISS
       #include <trace.h>

       int posix_trace_get_filter(trace_id_t _t_r_i_d, trace_event_set_t *_s_e_t);
       int posix_trace_set_filter(trace_id_t _t_r_i_d,
           const trace_event_set_t *_s_e_t, int _h_o_w);

DDEESSCCRRIIPPTTIIOONN
       The _p_o_s_i_x___t_r_a_c_e___g_e_t___f_i_l_t_e_r() function shall retrieve, into the argument
       pointed to by _s_e_t, the actual trace event filter from the trace stream
       specified by _t_r_i_d.

       The _p_o_s_i_x___t_r_a_c_e___s_e_t___f_i_l_t_e_r() function shall change the set of filtered
       trace event types after a trace stream identified by the _t_r_i_d argument
       is created. This function may be called prior to starting the trace
       stream, or while the trace stream is active. By default, if no call is
       made to _p_o_s_i_x___t_r_a_c_e___s_e_t___f_i_l_t_e_r(), all trace events shall be recorded
       (that is, none of the trace event types are filtered out).

       If this function is called while the trace is in progress, a special
       system trace event, POSIX_TRACE_FILTER, shall be recorded in the trace
       indicating both the old and the new sets of filtered trace event types
       (see _T_a_b_l_e _2_-_4, _T_r_a_c_e _a_n_d _T_r_a_c_e _E_v_e_n_t _F_i_l_t_e_r _O_p_t_i_o_n_s_: _S_y_s_t_e_m _T_r_a_c_e
       _E_v_e_n_t_s and _T_a_b_l_e _2_-_6, _T_r_a_c_e, _T_r_a_c_e _L_o_g, _a_n_d _T_r_a_c_e _E_v_e_n_t _F_i_l_t_e_r _O_p_t_i_o_n_s_:
       _S_y_s_t_e_m _T_r_a_c_e _E_v_e_n_t_s).

       If the _p_o_s_i_x___t_r_a_c_e___s_e_t___f_i_l_t_e_r() function is interrupted by a signal, an
       error shall be returned and the filter shall not be changed. In this
       case, the state of the trace stream shall not be changed.

       The value of the argument _h_o_w indicates the manner in which the set is
       to be changed and shall have one of the following values, as defined in
       the _<_t_r_a_c_e_._h_> header:

       POSIX_TRACE_SET_EVENTSET
             The resulting set of trace event types to be filtered shall be
             the trace event type set pointed to by the argument _s_e_t.

       POSIX_TRACE_ADD_EVENTSET
             The resulting set of trace event types to be filtered shall be
             the union of the current set and the trace event type set pointed
             to by the argument _s_e_t.

       POSIX_TRACE_SUB_EVENTSET
             The resulting set of trace event types to be filtered shall be
             all trace event types in the current set that are not in the set
             pointed to by the argument _s_e_t; that is, remove each element of
             the specified set from the current filter.

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___g_e_t___f_i_l_t_e_r() function stores the set of filtered trace
       event types in _s_e_t, if successful.

EERRRROORRSS
       These functions shall fail if:

       EEIINNVVAALL The value of the _t_r_i_d argument does not correspond to an active
              trace stream or the value of the argument pointed to by _s_e_t is
              invalid.

       EEIINNTTRR  The operation was interrupted by a signal.

       _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 _p_o_s_i_x___t_r_a_c_e___g_e_t___f_i_l_t_e_r() and _p_o_s_i_x___t_r_a_c_e___s_e_t___f_i_l_t_e_r() functions may
       be removed in a future version.

SSEEEE AALLSSOO
       _T_a_b_l_e _2_-_4, _T_r_a_c_e _a_n_d _T_r_a_c_e _E_v_e_n_t _F_i_l_t_e_r _O_p_t_i_o_n_s_: _S_y_s_t_e_m _T_r_a_c_e _E_v_e_n_t_s,
       _T_a_b_l_e _2_-_6, _T_r_a_c_e, _T_r_a_c_e _L_o_g, _a_n_d _T_r_a_c_e _E_v_e_n_t _F_i_l_t_e_r _O_p_t_i_o_n_s_: _S_y_s_t_e_m
       _T_r_a_c_e _E_v_e_n_t_s, _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_s_e_t___a_d_d()

       The Base Definitions volume of POSIX.1-2017, <<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_GET_FILTER(3)
