Top | ![]() |
![]() |
![]() |
![]() |
#define | UPROF_STATIC_COUNTER() |
#define | UPROF_COUNTER() |
#define | UPROF_COUNTER_INC() |
#define | UPROF_COUNTER_DEC() |
#define | UPROF_COUNTER_ZERO() |
void | uprof_context_add_counter () |
#define UPROF_STATIC_COUNTER(COUNTER_SYMBOL, NAME, DESCRIPTION, PRIV)
Declares a new static counter structure which can be used with the
UPROF_COUNTER_INC()
, UPROF_COUNTER_DEC()
and UPROF_COUNTER_ZERO()
macros.
COUNTER_SYMBOL |
The name of the C symbol to declare |
|
NAME |
The name of the counter used for reporting |
|
DESCRIPTION |
A string describing what the timer represents |
|
PRIV |
Optional private data (unsigned long) which you can access if you are generating a very customized report. For example you might put application specific flags here that affect reporting. |
#define UPROF_COUNTER(COUNTER_SYMBOL, NAME, DESCRIPTION, PRIV)
Declares a new counter structure which can be used with the
UPROF_COUNTER_INC()
, UPROF_COUNTER_DEC()
and UPROF_COUNTER_ZERO()
macros.
Usually you should use UPROF_STATIC_COUNTER()
instead, but this may be useful
for special cases where counters are accessed from multiple files.
COUNTER_SYMBOL |
The name of the C symbol to declare |
|
NAME |
The name of the counter used for reporting |
|
DESCRIPTION |
A string describing what the timer represents |
|
PRIV |
Optional private data (unsigned long) which you can access if you are generating a very customized report. For example you might put application specific flags here that affect reporting. |
#define UPROF_COUNTER_INC(CONTEXT, COUNTER_SYMBOL)
Increases the count for the given COUNTER_SYMBOL
.
#define UPROF_COUNTER_DEC(CONTEXT, COUNTER_SYMBOL)
Decreases the count for the given COUNTER_SYMBOL
.
#define UPROF_COUNTER_ZERO(CONTEXT, COUNTER_SYMBOL)
Resets the count for the given COUNTER_SYMBOL
.
void uprof_context_add_counter (UProfContext *context
,UProfCounter *counter
);
Declares a new uprof counter and associates it with a context. Normally this
API isn't used directly because the UPROF_COUNTER_INC()
, UPROF_COUNTER_DEC()
and UPROF_COUNTER_ZERO()
macros will ensure a counter is added the first
time it used.