|
RKH
|
Defines constants and macros which are internally used by RKH trace facility. More...
#include "rkhitl.h"
Go to the source code of this file.
Macros | |
| #define | RKH_CFG_TRC_SIZEOF_TE_ID 8 |
| Specify the size of the trace event identification. The valid values [in bits] are 8, 16 or 32. Default is 8. | |
| #define | RKH_TRC_AO_ISOFF(prio) |
| Test the state machine application (SMA) filter condition. | |
| #define | RKH_TRC_SIG_ISOFF(sig) |
| Test the event signal filter condition. | |
| #define | RKH_TRC_MAX_EVENTS (RKH_MAX_NUM_TE_PER_GROUP * RKH_TRC_MAX_GROUPS) |
| #define | RKH_TRC_MAX_SMA (RKH_CFG_FWK_MAX_SMA / 8) |
| The size of trcsmaftbl[] (trace SMA filter table) depends on RKH_CFG_FWK_MAX_SMA (see rkhcfg.h). | |
| #define | RKH_TRC_MAX_SIGNALS (RKH_CFG_FWK_MAX_SIGNALS / 8) |
| The size of trcsigftbl[] (trace signal filter table) depends on RKH_CFG_FWK_MAX_SIGNALS and RKH_CFG_FWK_SIZEOF_EVT (see rkhcfg.h). | |
| #define | RKH_TOT_NUM_TRC_EVTS |
| #define | RKH_TRC_MAX_EVENTS_IN_BYTES RKH_TOT_NUM_TRC_EVTS |
| Defines the size of trace filter table according to RKH_TOT_NUM_TRC_EVTS and RKH_TRC_MAX_EVENTS. | |
| #define | RKH_TRC_ALL_GROUPS RKH_TG_NGROUP |
| Emit or suppress tracing for all groups and events. | |
| #define | RKH_TRC_ALL_EVENTS RKH_TE_NEVENT |
| Emit or suppress all trace events. | |
| #define | RKH_TRC_SET_ALL(mode_) ((mode_) | RKH_TRC_ALL_FILTERS) |
| Emit or supress tracing for all signal/active objects. | |
| #define | RKH_XOR 0x20 |
| #define | RKH_FLG 0x7E |
| #define | RKH_ESC 0x7D |
| #define | RKH_TG_MP 0 |
| Memory Pool group (MP) | |
| #define | RKH_TG_QUE 1 |
| Reference Queue group (QUE) | |
| #define | RKH_TG_SMA 2 |
| State Machine Application group (SMA) | |
| #define | RKH_TG_SM 3 |
| State Machine group (SM) | |
| #define | RKH_TG_TMR 4 |
| Timer group (TIM) | |
| #define | RKH_TG_FWK 5 |
| Framework RKH group (FWK) | |
| #define | RKH_TG_USR 6 |
| User group (USR) | |
| #define | RKH_TG_UT 7 |
| Unit test harness group (UT) | |
| #define | RKH_TG_NGROUP 8 |
| Number of trace groups. | |
| #define | RKH_TE_MP_INIT RKH_MP_START |
| #define | RKH_TE_MP_GET (RKH_TE_MP_INIT + 1) |
| #define | RKH_TE_MP_PUT (RKH_TE_MP_GET + 1) |
| #define | RKH_TE_QUE_INIT RKH_QUE_START |
| #define | RKH_TE_QUE_GET (RKH_TE_QUE_INIT + 1) |
| #define | RKH_TE_QUE_FIFO (RKH_TE_QUE_GET + 1) |
| #define | RKH_TE_QUE_LIFO (RKH_TE_QUE_FIFO + 1) |
| #define | RKH_TE_QUE_FULL (RKH_TE_QUE_LIFO + 1) |
| #define | RKH_TE_QUE_DPT (RKH_TE_QUE_FULL + 1) |
| #define | RKH_TE_QUE_GET_LAST (RKH_TE_QUE_DPT +1 ) |
| #define | RKH_TE_SMA_ACT RKH_SMA_START |
| #define | RKH_TE_SMA_TERM (RKH_TE_SMA_ACT + 1) |
| #define | RKH_TE_SMA_GET (RKH_TE_SMA_TERM + 1) |
| #define | RKH_TE_SMA_FIFO (RKH_TE_SMA_GET + 1) |
| #define | RKH_TE_SMA_LIFO (RKH_TE_SMA_FIFO + 1) |
| #define | RKH_TE_SMA_REG (RKH_TE_SMA_LIFO + 1) |
| #define | RKH_TE_SMA_UNREG (RKH_TE_SMA_REG + 1) |
| #define | RKH_TE_SMA_DEFER (RKH_TE_SMA_UNREG + 1) |
| #define | RKH_TE_SMA_RCALL (RKH_TE_SMA_DEFER + 1) |
| #define | RKH_TE_SM_INIT RKH_SM_START |
| #define | RKH_TE_SM_CLRH (RKH_TE_SM_INIT + 1) |
| #define | RKH_TE_SM_TRN (RKH_TE_SM_CLRH + 1) |
| #define | RKH_TE_SM_STATE (RKH_TE_SM_TRN + 1) |
| #define | RKH_TE_SM_ENSTATE (RKH_TE_SM_STATE + 1) |
| #define | RKH_TE_SM_EXSTATE (RKH_TE_SM_ENSTATE + 1) |
| #define | RKH_TE_SM_NENEX (RKH_TE_SM_EXSTATE + 1) |
| #define | RKH_TE_SM_NTRNACT (RKH_TE_SM_NENEX + 1) |
| #define | RKH_TE_SM_TS_STATE (RKH_TE_SM_NTRNACT + 1) |
| #define | RKH_TE_SM_EVT_PROC (RKH_TE_SM_TS_STATE + 1) |
| #define | RKH_TE_SM_EVT_NFOUND (RKH_TE_SM_EVT_PROC + 1) |
| #define | RKH_TE_SM_GRD_FALSE (RKH_TE_SM_EVT_NFOUND + 1) |
| #define | RKH_TE_SM_CND_NFOUND (RKH_TE_SM_GRD_FALSE + 1) |
| #define | RKH_TE_SM_UNKN_STATE (RKH_TE_SM_CND_NFOUND + 1) |
| #define | RKH_TE_SM_EX_HLEVEL (RKH_TE_SM_UNKN_STATE + 1) |
| #define | RKH_TE_SM_EX_TSEG (RKH_TE_SM_EX_HLEVEL + 1) |
| #define | RKH_TE_SM_EXE_ACT (RKH_TE_SM_EX_TSEG + 1) |
| #define | RKH_TE_SM_DCH (RKH_TE_SM_EXE_ACT + 1) |
| #define | RKH_TE_TMR_INIT RKH_TMR_START |
| #define | RKH_TE_TMR_START (RKH_TE_TMR_INIT + 1) |
| #define | RKH_TE_TMR_STOP (RKH_TE_TMR_START + 1) |
| #define | RKH_TE_TMR_TOUT (RKH_TE_TMR_STOP + 1) |
| #define | RKH_TE_TMR_REM (RKH_TE_TMR_TOUT + 1) |
| #define | RKH_TE_FWK_EN RKH_FWK_START |
| #define | RKH_TE_FWK_EX (RKH_TE_FWK_EN + 1) |
| #define | RKH_TE_FWK_EPREG (RKH_TE_FWK_EX + 1) |
| #define | RKH_TE_FWK_AE (RKH_TE_FWK_EPREG + 1) |
| #define | RKH_TE_FWK_GC (RKH_TE_FWK_AE + 1) |
| #define | RKH_TE_FWK_GCR (RKH_TE_FWK_GC + 1) |
| #define | RKH_TE_FWK_OBJ (RKH_TE_FWK_GCR + 1) |
| #define | RKH_TE_FWK_SIG (RKH_TE_FWK_OBJ + 1) |
| #define | RKH_TE_FWK_FUN (RKH_TE_FWK_SIG + 1) |
| #define | RKH_TE_FWK_EXE_FUN (RKH_TE_FWK_FUN + 1) |
| #define | RKH_TE_FWK_SYNC_EVT (RKH_TE_FWK_EXE_FUN + 1) |
| #define | RKH_TE_FWK_TUSR (RKH_TE_FWK_SYNC_EVT + 1) |
| #define | RKH_TE_FWK_TCFG (RKH_TE_FWK_TUSR + 1) |
| #define | RKH_TE_FWK_ASSERT (RKH_TE_FWK_TCFG + 1) |
| #define | RKH_TE_FWK_AO (RKH_TE_FWK_ASSERT + 1) |
| #define | RKH_TE_FWK_STATE (RKH_TE_FWK_AO + 1) |
| #define | RKH_TE_FWK_PSTATE (RKH_TE_FWK_STATE + 1) |
| #define | RKH_TE_FWK_TIMER (RKH_TE_FWK_PSTATE + 1) |
| #define | RKH_TE_FWK_EPOOL (RKH_TE_FWK_TIMER + 1) |
| #define | RKH_TE_FWK_QUEUE (RKH_TE_FWK_EPOOL + 1) |
| #define | RKH_TE_FWK_ACTOR (RKH_TE_FWK_QUEUE + 1) |
| #define | RKH_TRC_BEGIN_WOFIL(eid_) |
| #define | RKH_TRC_END_WOFIL() |
| #define | RKH_TRC_BEGIN_WOFIL_NOCRIT(eid_) rkh_trc_begin(eid_); |
| #define | RKH_TRC_END_WOFIL_NOCRIT() rkh_trc_end(); \ |
| #define | RKH_TRC_BEGIN_DFT(eid_) |
| #define | RKH_TRC_END_DFT() |
| #define | RKH_TRC_U8_RAW(d) rkh_trc_put((d)) |
| Insert a 1-byte without escaping it. | |
| #define | RKH_TRC_UI8(d) rkh_trc_u8((rui8_t)(d)) |
| Insert a 1-byte data. | |
| #define | RKH_TRC_UI16(d) rkh_trc_u16((d)) |
| Insert a 2-byte data. | |
| #define | RKH_TRC_UI32(d) rkh_trc_u32((d)) |
| Insert a 4-byte data. | |
| #define | RKH_TRC_STR(s) rkh_trc_str((s)) |
| Insert a string. | |
| #define | RKH_TRC_SYM(sym) RKH_TRC_UI32((rui32_t)sym) |
| Insert a object address as trace record argument. | |
| #define | RKH_TRC_SNDR(sym) RKH_TRC_SYM(sym) |
| Insert a sender object address as trace record argument. | |
| #define | RKH_TRC_FUN(sym) RKH_TRC_UI32((rui32_t)sym) |
| Insert a function address as trace record argument. | |
| #define | RKH_TRC_NTICK(nt) RKH_TRC_UI8(nt) |
| #define | RKH_TRC_NBLK(nb) RKH_TRC_UI8(nb) |
| #define | RKH_TRC_BSIZE(bs) RKH_TRC_UI8(bs) |
| #define | RKH_TRC_NE(ne) RKH_TRC_UI8(ne) |
| #define | RKH_TRC_SIG(e) RKH_TRC_UI8(e) |
| #define | RKH_TRC_ES(es) RKH_TRC_UI8(es) |
Typedefs | |
| typedef rui8_t | RKH_TE_ID_T |
| Describes a trace event identification (ID). | |
| typedef rui16_t | RKH_TS_T |
| Defines the size of trace timestamp. | |
| typedef rui8_t | RKH_TG_T |
| Group of events. | |
Enumerations | |
| enum | RKH_TRC_FMT { RKH_I8_T , RKH_UI8_T , RKH_I16_T , RKH_UI16_T , RKH_I32_T , RKH_UI32_T , RKH_X32_T , RKH_STR_T , RKH_MEM_T , RKH_OBJ_T , RKH_FUN_T , RKH_ESIG_T } |
| Enumerates data formats recognized by Trazer. More... | |
| enum | RKH_SUBTE_SM_EXE_ACT { RKH_SUBTE_SM_EXE_ACT_EFF , RKH_SUBTE_SM_EXE_ACT_EN , RKH_SUBTE_SM_EXE_ACT_EX , RKH_SUBTE_SM_EXE_ACT_INI , RKH_SUBTE_SM_EXE_ACT_PP , RKH_SUBTE_SM_EXE_ACT_GRD } |
| Sub-event of RKH_TE_SM_EXE_ACT event. More... | |
Defines constants and macros which are internally used by RKH trace facility.
Definition in file rkhtrc_define.h.
| #define RKH_CFG_TRC_SIZEOF_TE_ID 8 |
Specify the size of the trace event identification. The valid values [in bits] are 8, 16 or 32. Default is 8.
Definition at line 75 of file rkhtrc_define.h.
| #define RKH_TRC_AO_ISOFF | ( | prio | ) |
Test the state machine application (SMA) filter condition.
| [in] | prio | SMA priority. |
Definition at line 108 of file rkhtrc_define.h.
| #define RKH_TRC_SIG_ISOFF | ( | sig | ) |
Test the event signal filter condition.
| [in] | sig | event signal. |
Definition at line 134 of file rkhtrc_define.h.
| #define RKH_TRC_MAX_EVENTS (RKH_MAX_NUM_TE_PER_GROUP * RKH_TRC_MAX_GROUPS) |
Specify the maximum number of trace events, this number is direclty related with the RKH_TE_<group>_<event> definitions. The smaller this number, the lower the RAM consumption. See trceftbl table.
Definition at line 165 of file rkhtrc_define.h.
| #define RKH_MP_START GRPLSH(RKH_TG_MP) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 207 of file rkhtrc_define.h.
| #define RKH_QUE_START GRPLSH(RKH_TG_QUE) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 208 of file rkhtrc_define.h.
| #define RKH_SMA_START GRPLSH(RKH_TG_SMA) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 209 of file rkhtrc_define.h.
| #define RKH_SM_START GRPLSH(RKH_TG_SM) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 210 of file rkhtrc_define.h.
| #define RKH_TMR_START GRPLSH(RKH_TG_TMR) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 211 of file rkhtrc_define.h.
| #define RKH_FWK_START GRPLSH(RKH_TG_FWK) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 212 of file rkhtrc_define.h.
| #define RKH_USR_START GRPLSH(RKH_TG_USR) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 213 of file rkhtrc_define.h.
| #define RKH_UT_START GRPLSH(RKH_TG_UT) |
Trace event offset.
The trace event ID is arranged as:
event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
The lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Definition at line 214 of file rkhtrc_define.h.
| #define RKH_MP_TTBL_RANGE 1 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 223 of file rkhtrc_define.h.
| #define RKH_QUE_TTBL_RANGE 1 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 224 of file rkhtrc_define.h.
| #define RKH_SMA_TTBL_RANGE 2 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 225 of file rkhtrc_define.h.
| #define RKH_SM_TTBL_RANGE 3 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 226 of file rkhtrc_define.h.
| #define RKH_TIM_TTBL_RANGE 1 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 227 of file rkhtrc_define.h.
| #define RKH_FWK_TTBL_RANGE 3 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 228 of file rkhtrc_define.h.
| #define RKH_USR_TTBL_RANGE 4 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 229 of file rkhtrc_define.h.
| #define RKH_UT_TTBL_RANGE 2 |
Max. number of used trace events in a particular group in octets, thus the desired value must be divided by 8 (1 -> 8 events).
Definition at line 230 of file rkhtrc_define.h.
| #define RKH_TOT_NUM_TRC_EVTS |
Defines the total number of trace events.
Definition at line 236 of file rkhtrc_define.h.
| #define RKH_XOR 0x20 |
x-ored byte for stuffing a single byte
Definition at line 305 of file rkhtrc_define.h.
| #define RKH_FLG 0x7E |
flag byte, used as a trace event delimiter
Definition at line 308 of file rkhtrc_define.h.
| #define RKH_ESC 0x7D |
escape byte stuffing a single byte
Definition at line 311 of file rkhtrc_define.h.
| #define RKH_TRC_BEGIN_WOFIL | ( | eid_ | ) |
Idem RKH_TRC_BEGIN() macro but use it for trace events that are independent of any runtime filter.
Definition at line 716 of file rkhtrc_define.h.
| #define RKH_TRC_END_WOFIL | ( | ) |
Idem RKH_TRC_END() macro but use it for trace events that are independent of any runtime filter.
Definition at line 725 of file rkhtrc_define.h.
| #define RKH_TRC_BEGIN_WOFIL_NOCRIT | ( | eid_ | ) | rkh_trc_begin(eid_); |
Idem RKH_TRC_BEGIN_WOFIL() macro but without entering critical section.
Definition at line 732 of file rkhtrc_define.h.
| #define RKH_TRC_END_WOFIL_NOCRIT | ( | ) | rkh_trc_end(); \ |
Idem RKH_TRC_END_WOFIL_NOCRIT() macro but without entering critical section.
Definition at line 739 of file rkhtrc_define.h.
| #define RKH_TRC_BEGIN_DFT | ( | eid_ | ) |
Idem RKH_TRC_BEGIN() macro with default configuration, i.e. without timestamp, and number of sequence, but with 8-bit checksum.
Definition at line 746 of file rkhtrc_define.h.
| #define RKH_TRC_END_DFT | ( | ) |
Idem RKH_TRC_END() macro but use it for trace events that are independent of any runtime filter.
Definition at line 756 of file rkhtrc_define.h.
| #define RKH_TRC_NTICK | ( | nt | ) | RKH_TRC_UI8(nt) |
Insert a ntick value as trace record argument.
Definition at line 1021 of file rkhtrc_define.h.
| #define RKH_TRC_NBLK | ( | nb | ) | RKH_TRC_UI8(nb) |
Insert a nblock value as trace record argument.
Definition at line 1056 of file rkhtrc_define.h.
| #define RKH_TRC_BSIZE | ( | bs | ) | RKH_TRC_UI8(bs) |
Insert the block size value as trace record argument.
Definition at line 1079 of file rkhtrc_define.h.
| #define RKH_TRC_NE | ( | ne | ) | RKH_TRC_UI8(ne) |
Insert a nelem value as trace record argument.
Definition at line 1114 of file rkhtrc_define.h.
| #define RKH_TRC_SIG | ( | e | ) | RKH_TRC_UI8(e) |
Insert a signal number as trace record argument.
Definition at line 1137 of file rkhtrc_define.h.
| #define RKH_TRC_ES | ( | es | ) | RKH_TRC_UI8(es) |
Insert an event size value as trace record argument.
Definition at line 1154 of file rkhtrc_define.h.
| typedef rui8_t RKH_TE_ID_T |
Describes a trace event identification (ID).
The trace event ID is arranged as: event number = | G | G | G | E | E | E | E | E |
G's: group number.
E's: event's group.
Where the lower 5 bits (E's) of the event ID are used to determine the trace event, while the next three most significant bits (G's) are used to determine the corresponding group. Therefore, is able to define 8 groups and 32 events per group.
Trace events are binary data consisting of a trace header and its associated event data. Every trace header is made up of a ID and a timestamp. The number of bytes used by the timestamp is configurable by RKH_TRC_SIZEOF_TS (1, 2 or 4 bytes). After the timestamp follows the event data. The content and size of the data portion of a trace event is determined by the event ID. All types of events are stored in a single ring buffer, called trace stream, using a variable event size. In this manner the recorder always holds the most recent history. On the other hand, all data are stored in little-endian order (least significant byte first). Also, they are stored into the trace stream 1 byte at a time, thus avoiding any potential data misalignment problems.
Definition at line 1221 of file rkhtrc_define.h.
| typedef rui16_t RKH_TS_T |
Defines the size of trace timestamp.
The valid values [in bits] are 8, 16 or 32. Default is 16. This type is configurable via the RKH_CFGPORT_TRC_SIZEOF_TSTAMP preprocessor option.
Definition at line 1242 of file rkhtrc_define.h.
| enum RKH_TRC_FMT |
Enumerates data formats recognized by Trazer.
Trazer uses this enumeration is used only internally for the formatted user data elements.
Definition at line 1165 of file rkhtrc_define.h.
| enum RKH_SUBTE_SM_EXE_ACT |
Sub-event of RKH_TE_SM_EXE_ACT event.
| Enumerator | |
|---|---|
| RKH_SUBTE_SM_EXE_ACT_EFF | |
| RKH_SUBTE_SM_EXE_ACT_EN | |
| RKH_SUBTE_SM_EXE_ACT_EX | |
| RKH_SUBTE_SM_EXE_ACT_INI | |
| RKH_SUBTE_SM_EXE_ACT_PP | |
| RKH_SUBTE_SM_EXE_ACT_GRD | |
Definition at line 1261 of file rkhtrc_define.h.