OilProfile

OilProfile — Measuring the length of time needed to execute Liboil functions.

Functions

Types and Values

Description

Functions

oil_profile_stamp ()

unsigned long
oil_profile_stamp (void);

Creates a timestamp based on a CPU-specific high-frequency counter, if available.

Returns

a timestamp


oil_profile_init ()

void
oil_profile_init (OilProfile *prof);

Initializes a profiling structure.

Parameters

prof

the OilProfile structure

 

oil_profile_stop_handle ()

void
oil_profile_stop_handle (OilProfile *prof);

Handles post-processing of a single profiling run.

FIXME: need more info

Parameters

prof

the OilProfile structure

 

oil_profile_get_ave_std ()

void
oil_profile_get_ave_std (OilProfile *prof,
                         double *ave_p,
                         double *std_p);

Calculates the average and standard deviation of a number of profiling runs, and places the results in the locations provided by ave_p and std_p . Either ave_p and std_p may be NULL, in which case the values will not be written.

Parameters

prof

the OilProfile structure

 

ave_p

pointer to average

 

std_p

pointer to standard deviation

 

oil_profile_start()

#define             oil_profile_start(x)

Starts a profiling run by obtaining a timestamp via oil_profile_stamp() and writing it into x .

Parameters

x

a pointer to an OilProfile structure

 

oil_profile_stop()

#define             oil_profile_stop(x)

Stops a profiling run by obtaining a timestamp via oil_profile_stamp() and writing it into x . It then calls oil_profile_stop_handle() to handle post-processing of the profiling run.

Parameters

x

a pointer to an OilProfile structure

 

Types and Values

struct OilProfile

struct OilProfile {
};

An opaque structure representing profiling information.


OIL_PROFILE_HIST_LENGTH

#define OIL_PROFILE_HIST_LENGTH 10

Internal definition of the number of histogram entries in OilProfile.