source: trunk/lib/perflib/perfsec.h @ 493

Last change on this file since 493 was 493, checked in by ksherdy, 9 years ago

Update paths for svn propedit

File size: 959 bytes
Line 
1
2#include "BOM_Profiler.h"
3
4#if defined(CODE_CLOCKER)
5        #include "../cclib/cc.h"
6        #include "../cclib/cc.cxx"     
7#endif
8
9#if defined(BUFFER_PROFILING)
10
11        #define PERF_SEC_INIT(timer) \
12                timer = init_BOM_timer()
13       
14        #define PERF_SEC_START(timer) \
15                start_BOM_interval(timer) 
16       
17        #define PERF_SEC_END(timer,elems) \
18                end_BOM_interval(timer,elems) 
19       
20        #define PERF_SEC_DUMP(timer) \
21                dump_BOM_table(timer)
22       
23        #define PERF_SEC_DESTROY(timer) \
24                destroy_BOM_timer(timer)       
25       
26#elif defined(CODE_CLOCKER)
27
28        #define PERF_SEC_INIT(timer)
29               
30        #define PERF_SEC_START(timer) \
31                timer->start_interval()
32
33        #define PERF_SEC_END(timer,elems) \
34                timer->end_interval(elems)
35       
36        #define PERF_SEC_DUMP(timer) \
37                timer->dump_avg_kelem() \
38               
39        #define PERF_SEC_DESTROY(timer) \
40                if(timer) delete timer
41               
42#else
43
44        #define PERF_SEC_INIT(timer)
45        #define PERF_SEC_START(timer)
46        #define PERF_SEC_END(timer,elems)
47        #define PERF_SEC_DUMP(timer)
48        #define PERF_SEC_DESTROY(timer)
49
50#endif
51
Note: See TracBrowser for help on using the repository browser.