![]() |
![]() |
![]() |
UProf 0.3.0 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define UPROF_STATIC_COUNTER (COUNTER_SYMBOL, NAME, DESCRIPTION, PRIV) #define UPROF_COUNTER (COUNTER_SYMBOL, NAME, DESCRIPTION, PRIV) #define UPROF_COUNTER_INC (CONTEXT, COUNTER_SYMBOL) #define UPROF_COUNTER_DEC (CONTEXT, COUNTER_SYMBOL) #define UPROF_COUNTER_ZERO (CONTEXT, COUNTER_SYMBOL) void uprof_context_add_counter (UProfContext *context
,UProfCounter *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.
|
The name of the C symbol to declare |
|
The name of the counter used for reporting |
|
A string describing what the timer represents |
|
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.
|
The name of the C symbol to declare |
|
The name of the counter used for reporting |
|
A string describing what the timer represents |
|
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
.
|
A UProfContext |
|
A counter variable |
#define UPROF_COUNTER_DEC(CONTEXT, COUNTER_SYMBOL)
Decreases the count for the given COUNTER_SYMBOL
.
|
A UProfContext |
|
A counter variable |
#define UPROF_COUNTER_ZERO(CONTEXT, COUNTER_SYMBOL)
Resets the count for the given COUNTER_SYMBOL
.
|
A UProfContext |
|
A counter variable |
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.