Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

instrumentation.c File Reference


Detailed Description

Implementation of the functions in instrumentation.h.

Definition in file instrumentation.c.

Include dependency graph for instrumentation.c:

Include dependency graph

Go to the source code of this file.

Defines

#define IP_HISTORY_START_ADD(ip, amount)   ((ip)->ip_History.start + (amount)) % (ip)->ip_History.length
 Add an amount to an existing index into the ip_History.data array of the iPoint structure.


Functions

void iInitPoint (struct iPoint *ip)
void iPostFloatData (struct iPoint *ip, double value)
 Post a floating point data value to an instrumentation point.

void iPrintPoint (FILE *file, struct iPoint *ip)
 Print the collected values for an instrumentation point.

void iPrintPoints (FILE *file)
 Print all of the instrumentation points that have had data posted to them.

void iPrintPointsAtExit (void)
 An atexit(3) function that calls iPrintPoints with a file whose name is taken from instrumentation_data.iid_OutputFileName or derived from the package name and process ID.


Variables

const char * DEFAULT_INSTRUMENTATION_FILE_NAME
 The default name for the instrumentation file.

iInstrumentationData instrumentation_data
 The global data needed by the instrumentation infrastructure.


Define Documentation

#define IP_HISTORY_START_ADD ip,
amount   )     ((ip)->ip_History.start + (amount)) % (ip)->ip_History.length
 

Add an amount to an existing index into the ip_History.data array of the iPoint structure.

In case the addition causes the index to extend beyond the bounds of the array, the result will be wrapped around to the beginning.

Parameters:
ip A pointer to a valid iPoint.
amount The amount to add to the ip_History.start value.
Returns:
The new index.

Definition at line 37 of file instrumentation.c.

Referenced by iPostFloatData(), and iPrintPoint().


Function Documentation

void iPostFloatData struct iPoint *  ip,
double  value
 

Post a floating point data value to an instrumentation point.

Parameters:
ip The instrumentation point to add the given value to.
value The value to add.

Definition at line 71 of file instrumentation.c.

References IP_HISTORY_START_ADD, and require.

void iPrintPoint FILE *  file,
struct iPoint *  ip
 

Print the collected values for an instrumentation point.

Parameters:
file The file to print the data to.
ip The instrumentation point to print out.

Definition at line 108 of file instrumentation.c.

References IP_HISTORY_START_ADD, and require.

Referenced by iPrintPoints().

void iPrintPoints FILE *  file  ) 
 

Print all of the instrumentation points that have had data posted to them.

Parameters:
file The file to print the data to.

Definition at line 155 of file instrumentation.c.

References instrumentation_data, iPrintPoint(), and require.

Referenced by iPrintPointsAtExit().

Here is the call graph for this function:


Variable Documentation

const char* DEFAULT_INSTRUMENTATION_FILE_NAME [static]
 

Initial value:

    PACKAGE "-instrumentation-%d.txt"
The default name for the instrumentation file.

Definition at line 43 of file instrumentation.c.

Referenced by iPrintPointsAtExit().


Generated on Mon Dec 1 16:29:37 2003 for CPU Broker by doxygen 1.3.4