00001
00002
00003
00004
00005
00006 #ifndef __MEASURE__
00007 #define __MEASURE__
00008
00009 #ifdef PERF
00010 #define MSR_INIT() Msr_Init()
00011 #define MSR_TERMINATE() Msr_Terminate()
00012 #define MSR_REGISTER(a) Msr_Register(a)
00013 #define MSR_RESET(a) Msr_Reset(a)
00014 #define MSR_CONTROL(a) Msr_Control(a)
00015 #define MSR_START(a) Msr_Start(a)
00016 #define MSR_STOP(a) Msr_Stop(a)
00017 #define MSR_NOTE(a) Msr_Note(a)
00018 #define MSR_INTEGER(a,b) Msr_Integer(a,b)
00019 #define MSR_DUMP(a) Msr_Dump(a)
00020 #define MSR_DUMPSTATS(a) Msr_DumpStats(a)
00021 #else
00022 #define MSR_INIT() ((void)0)
00023 #define MSR_TERMINATE() ((void)0)
00024 #define MSR_REGISTER(a) 0
00025 #define MSR_RESET(a) ((void)0)
00026 #define MSR_CONTROL(a) ((void)0)
00027 #define MSR_START(a) ((void)0)
00028 #define MSR_STOP(a) ((void)0)
00029 #define MSR_NOTE(a) ((void)0)
00030 #define MSR_INTEGER(a,b) ((void)0)
00031 #define MSR_DUMP(a) ((void)0)
00032 #define MSR_DUMPSTATS(a) ((void)0)
00033 #endif
00034
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038
00039 void WINAPI Msr_Init(void);
00040
00041 void WINAPI Msr_Terminate(void);
00042
00043 int WINAPI Msr_Register(LPTSTR Incident);
00044
00045 void WINAPI Msr_Reset(int Id);
00046
00047 #define MSR_RESET_ALL 0
00048 #define MSR_PAUSE 1
00049 #define MSR_RUN 2
00050
00051 void WINAPI Msr_Control(int iAction);
00052
00053 void WINAPI Msr_Start(int Id);
00054
00055 void WINAPI Msr_Stop(int Id);
00056
00057 void WINAPI Msr_Note(int Id);
00058
00059 void WINAPI Msr_Integer(int Id, int n);
00060
00061 void WINAPI Msr_Dump(HANDLE hFile);
00062
00063 void WINAPI Msr_DumpStats(HANDLE hFile);
00064
00065 typedef void WINAPI MSR_DUMPPROC(HANDLE hFile);
00066 typedef void WINAPI MSR_CONTROLPROC(int iAction);
00067
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071
00072 #endif