3 * This file contains the standard insrumentation functions that are provied
4 * by the instrumentation layer.
11 typedef void (*instFunc)(void *cdata, int type, char *eventData);
13 typedef struct intCounterRec intCounter;
15 /* parameters to a instremented function */
16 typedef struct _parameteters parameters;
17 typedef enum { processTime, wallTime } timerType;
19 /* 64 bit time values */
20 typedef long long int time64;
21 typedef long long int int64;
24 unsigned int aggregate:1;
28 typedef struct sampleIdRec sampleId;
31 struct intCounterRec {
32 int value; /* this field must be first for setValue to work -jkh */
37 typedef struct floatCounterRec floatCounter;
38 struct floatCounterRec {
44 typedef struct tTimerRec tTimer;
46 int counter; /* must be 0 to start/stop */
49 time64 snapShot; /* used to get consistant value during st/stp */
50 int normalize; /* value to divide total by to get seconds */
54 volatile char sampled;
57 typedef (*filterFunc)(void *cdata, parameters *params);
60 * standard inst. functions.
65 * return the current CPU time in usec.
67 time64 DYNINSTgetCPUtime();
72 void DYNINSTstartTimer(tTimer *timer);
74 void DYNINSTstopTimer(tTimer *timer);
78 * timestamp and write the passed trace type, and event data to the passed
82 void DYNINSTgenerateTraceRecord(traceStream destination,
88 * Define the size of the per process data area.
90 * This should be a power of two to reduce paging and chacing shifts.
92 #define SYN_INST_BUF_SIZE 1024*512