uprof-counter

uprof-counter

Functions

Description

Functions

UPROF_STATIC_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.

Parameters

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.

 

UPROF_COUNTER()

#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.

Parameters

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.

 

UPROF_COUNTER_INC()

#define             UPROF_COUNTER_INC(CONTEXT, COUNTER_SYMBOL)

Increases the count for the given COUNTER_SYMBOL .

Parameters

CONTEXT

A UProfContext

 

COUNTER_SYMBOL

A counter variable

 

UPROF_COUNTER_DEC()

#define             UPROF_COUNTER_DEC(CONTEXT, COUNTER_SYMBOL)

Decreases the count for the given COUNTER_SYMBOL .

Parameters

CONTEXT

A UProfContext

 

COUNTER_SYMBOL

A counter variable

 

UPROF_COUNTER_ZERO()

#define             UPROF_COUNTER_ZERO(CONTEXT, COUNTER_SYMBOL)

Resets the count for the given COUNTER_SYMBOL .

Parameters

CONTEXT

A UProfContext

 

COUNTER_SYMBOL

A counter variable

 

uprof_context_add_counter ()

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.

Parameters

context

A UProfContext

 

Types and Values