RKH
rkhtrc_filter.h File Reference

Specifies the runtime filter operations for the trace facility. More...

#include "rkhtrc_define.h"
Include dependency graph for rkhtrc_filter.h:

Go to the source code of this file.

Data Structures

struct  RKH_TRC_FIL_T
 Represents the filter of signal and active object. More...
 

Macros

#define RKH_FILTER_ON_GROUP(grp)    rkh_trc_filter_group_(FILTER_ON, (grp), EUNCHANGE)
 Suppress the enabled trace events from a specific group. Use the RKH_TRC_ALL_GROUPS to disable all groups.
 
#define RKH_FILTER_OFF_GROUP(grp)    rkh_trc_filter_group_(FILTER_OFF, (grp), EUNCHANGE)
 Emit the enabled trace events from a specific group. Use the RKH_TRC_ALL_GROUPS to enable all groups.
 
#define RKH_FILTER_ON_EVENT(evt)    rkh_trc_filter_event_(FILTER_ON, (evt))
 Suppress (disable) one trace event. Use the RKH_TRC_ALL_EVENTS to disable all trace events.
 
#define RKH_FILTER_OFF_EVENT(evt)    rkh_trc_filter_event_(FILTER_OFF, (evt))
 Emit (enable) one trace event. Use the RKH_TRC_ALL_EVENTS to enable all trace events. More...
 
#define RKH_FILTER_ON_GROUP_ALL_EVENTS(grp)    rkh_trc_filter_group_(FILTER_ON, (grp), ECHANGE)
 Suppress (disable) all events in a specific group.
 
#define RKH_FILTER_OFF_GROUP_ALL_EVENTS(grp)    rkh_trc_filter_group_(FILTER_OFF, (grp), ECHANGE)
 Emit (enable) all events in a specific group. More...
 
#define RKH_FILTER_ON_SMA(sma)
 Suppress the enable trace events related to a specified active object.
 
#define RKH_FILTER_ON_ALL_SMA()    rkh_trc_symFil(RKHFilterSma, 0, RKH_TRC_SET_ALL(FILTER_ON))
 Suppress all enabled trace events related to active objects.
 
#define RKH_FILTER_OFF_SMA(sma)
 Emmit the enabled trace events related to a specified active object.
 
#define RKH_FILTER_OFF_ALL_SMA()    rkh_trc_symFil(RKHFilterSma, 0, RKH_TRC_SET_ALL(FILTER_OFF))
 Emmit all enabled trace events related to active objects.
 
#define RKH_FILTER_ON_SIGNAL(sig)    rkh_trc_symFil(RKHFilterSignal, (sig), FILTER_ON)
 Suppress the enabled trace events related to a specified event signal.
 
#define RKH_FILTER_ON_ALL_SIGNALS()    rkh_trc_symFil(RKHFilterSignal, 0, RKH_TRC_SET_ALL(FILTER_ON))
 Suppress all enabled trace events related to signals.
 
#define RKH_FILTER_OFF_SIGNAL(sig)    rkh_trc_symFil(RKHFilterSignal, (sig), FILTER_OFF)
 Emmit the enabled trace events related to a specified event signal.
 
#define RKH_FILTER_OFF_ALL_SIGNALS()    rkh_trc_symFil(RKHFilterSignal, 0, RKH_TRC_SET_ALL(FILTER_OFF))
 Emmit all enabled trace events related to signals.
 

Typedefs

typedef rui8_t RKH_TRC_FSLOT
 This data type defines the size of filter table for AO and signals.
 

Functions

void rkh_trc_filter_group_ (rui8_t ctrl, RKH_TG_T grp, rui8_t mode)
 Emit or suppress all trace events from a specific group. More...
 
void rkh_trc_filter_event_ (rui8_t ctrl, RKH_TE_ID_T evt)
 Emit or suppress a specific event. More...
 
rbool_t rkh_trc_isoff_ (RKH_TE_ID_T e)
 Test the group and event filter condition. More...
 
void rkh_trc_symFil (RKHFilter fd, RKH_TRC_FSLOT slot, rui8_t mode)
 Emmit or suppresse trace events related to a particular active object or event signal. More...
 
rbool_t rkh_trc_symFil_isoff (RKHFilter fd, RKH_TRC_FSLOT slot)
 Test the active objecto or signal filter condition. More...
 
void rkh_trc_filter_get (RKH_FilterTbl *outFilterTbl)
 Get a memory reference to every trace filter table. More...
 

Detailed Description

Specifies the runtime filter operations for the trace facility.

Definition in file rkhtrc_filter.h.

Function Documentation

◆ rkh_trc_filter_group_()

void rkh_trc_filter_group_ ( rui8_t  ctrl,
RKH_TG_T  grp,
rui8_t  mode 
)

Emit or suppress all trace events from a specific group.

The stream is initially created with an empty filter (that is, without filtering any event type). If this is not the required behavior, the application can build a set of event types, include the appropriate event types in it, and apply it as a filter to the stream. After that, the stream will reject any event whose type is in the filter set.

Gathering many events generates a lot of data, which requires memory and processor time. It also makes the task of interpreting the data more difficult. Because the amount of data that the instrumented framework generates can be overwhelming, the RKH supports several types of filters that can use it to reduce the amount of data to be processed. The available groups are enumerated in RKH_TG_<group> definitions.

Parameters
[in]ctrlfilter option, the available options are FILTER_ON or FILTER_OFF.
[in]grptrace group. The available groups are enumerated in RKH_TG_<group> definitions.
[in]modefilter mode. ECHANGE indicates that the all event's group are accordingly changed as filter option value, otherwise EUNCHANGE.
Usage
void
some_function(...)
{
...
}
#define RKH_FILTER_ON_EVENT(evt)
Suppress (disable) one trace event. Use the RKH_TRC_ALL_EVENTS to disable all trace events.
Definition: rkhtrc_filter.h:92
#define RKH_FILTER_ON_GROUP(grp)
Suppress the enabled trace events from a specific group. Use the RKH_TRC_ALL_GROUPS to disable all gr...
Definition: rkhtrc_filter.h:72
#define RKH_TRC_ALL_EVENTS
Emit or suppress all trace events.
#define RKH_TRC_ALL_GROUPS
Emit or suppress tracing for all groups and events.
Note
This function is internal to RKH and the user application should not call it. Please use RKH_FILTER_ON_GROUP(), or RKH_FILTER_OFF_GROUP() macros instead.

◆ rkh_trc_filter_event_()

void rkh_trc_filter_event_ ( rui8_t  ctrl,
RKH_TE_ID_T  evt 
)

Emit or suppress a specific event.

The stream is initially created with an empty filter (that is, without filtering any event type). If this is not the required behavior, the application can build a set of event types, include the appropriate event types in it, and apply it as a filter to the stream. After that, the stream will reject any event whose type is in the filter set.

Gathering many events generates a lot of data, which requires memory and processor time. It also makes the task of interpreting the data more difficult. Because the amount of data that the instrumented framework generates can be overwhelming, the RKH supports several types of filters that can use it to reduce the amount of data to be processed. The available events are enumerated in RKH_TE_<group>_<event> definitions.

Parameters
[in]ctrlfilter option, the available options are FILTER_ON or FILTER_OFF.
[in]evttrace event. The available events are enumerated in RKH_TE_<group>_<event> definitions.
Usage
void
some_function(...)
{
RKH_FILTER_OFF_EVENT(RKH_TE_SMA_DCH);
...
}
#define RKH_FILTER_OFF_EVENT(evt)
Emit (enable) one trace event. Use the RKH_TRC_ALL_EVENTS to enable all trace events.
#define RKH_TE_TMR_TOUT
Timer expired.
#define RKH_TE_FWK_OBJ
Entry symbol table for memory object.
#define RKH_TE_FWK_SIG
Entry symbol table for event signal.
#define RKH_TE_TMR_START
Start a timer.
#define RKH_TE_MP_INIT
Initializes the previously allocated memory pool data strcuture RKH_MEMPOOL_T.
Note
This function is internal to RKH and the user application should not call it. Please use RKH_FILTER_ON_EVENT(), or RKH_FILTER_OFF_EVENT() macros instead.

◆ rkh_trc_isoff_()

rbool_t rkh_trc_isoff_ ( RKH_TE_ID_T  e)

Test the group and event filter condition.

Parameters
[in]etrace event ID. The available events are enumerated in RKH_TE_<group>_<event> definitions.
Returns
'1' (RKH_TRUE) if the group and event is not filtered, otherwise '0' (RKH_FALSE).
Note
This function is internal to RKH and the user application should not call it.

◆ rkh_trc_symFil()

void rkh_trc_symFil ( RKHFilter  fd,
RKH_TRC_FSLOT  slot,
rui8_t  mode 
)

Emmit or suppresse trace events related to a particular active object or event signal.

Parameters
[in]fdfilter type.
[in]slotindicates the filter slot to be applied.
[in]modefilter option, the available options are FILTER_ON or FILTER_OFF.
Note
This function is internal to RKH and the user application should not call it. Please use RKH_FILTER_ON_SMA()/RKH_FILTER_ON_SIGNAL(), or RKH_FILTER_OFF_SMA()/RKH_FILTER_OFF_SIGNAL() macros instead.

◆ rkh_trc_symFil_isoff()

rbool_t rkh_trc_symFil_isoff ( RKHFilter  fd,
RKH_TRC_FSLOT  slot 
)

Test the active objecto or signal filter condition.

Parameters
[in]fdfilter type.
[in]slotindicates the filter slot to be applied.
Returns
'1' (RKH_TRUE) if the group and event is not filtered, otherwise '0' (RKH_FALSE).
Note
This function is internal to RKH and the user application should not call it.

◆ rkh_trc_filter_get()

void rkh_trc_filter_get ( RKH_FilterTbl *  outFilterTbl)

Get a memory reference to every trace filter table.

Parameters
[out]outFilterTblpointer to every filter table.