FPLBase
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Systrace

Android Systrace functions. More...

Detailed Description

Android Systrace functions.

To enable, #define ANDROID_ENABLE_SYSTRACE 1

Macros

#define MAX_SYSTRACE_LEN   256
 

Functions

void SystraceInit ()
 Initializes the settings for systrace. More...
 
void SystraceBegin (const char *name)
 Start a block, with the supplied name. More...
 
void SystraceEnd ()
 Ends the most recently begun block.
 
void SystraceCounter (const char *name, const int value)
 Logs a value. More...
 
void SystraceAsyncBegin (const char *name, const int32_t cookie)
 Begins an asynchronous block. More...
 
void SystraceAsyncEnd (const char *name, const int32_t cookie)
 Ends an asynchronous block. More...
 

Variables

int trace_marker = -1
 

Function Documentation

void SystraceAsyncBegin ( const char *  name,
const int32_t  cookie 
)
inline

Begins an asynchronous block.

Name/Cookie need to be unique per block.

Parameters
nameThe name of the block, which will appear in the trace.
cookiePart of the unique identifier to note the block.
void SystraceAsyncEnd ( const char *  name,
const int32_t  cookie 
)
inline

Ends an asynchronous block.

Parameters
nameThe name of the block, which needs to match the one used to begin the block.
cookieThe unique identifier of the block, which needs to match the one used to begin the block.
void SystraceBegin ( const char *  name)
inline

Start a block, with the supplied name.

This will last until SystraceEnd is called. Nesting is supported!

Parameters
nameThe name of the block, which will appear in the trace.
void SystraceCounter ( const char *  name,
const int  value 
)
inline

Logs a value.

This will be displayed on a graph in the systrace.

Parameters
nameThe name that will be logged.
valueThe value to be logged with the given name.
void SystraceInit ( )

Initializes the settings for systrace.

This needs to be called before any other systrace call.