Browse code

clarified "simple profiling"

Vaclav Kubart authored on 09/06/2006 08:48:39
Showing 2 changed files
... ...
@@ -1,4 +1,5 @@
1 1
 #ifdef SER
2
+#ifdef DO_PROFILE
2 3
 
3 4
 #include <cds/ser_profile.h>
4 5
 #include "dprint.h"
... ...
@@ -86,4 +87,6 @@ void ser_profile_init()
86 87
 	start_profile(trace_func);
87 88
 }
88 89
 
89
-#endif
90
+#endif /* DO_PROFILE */
91
+
92
+#endif /* SER */
... ...
@@ -3,10 +3,12 @@
3 3
 
4 4
 #ifdef SER
5 5
 
6
-/* declarations of watched profile points */
6
+#ifdef DO_PROFILING
7 7
 
8 8
 #include <cds/simple_profile.h>
9 9
 
10
+/* declarations of watched profile points */
11
+
10 12
 DECLARE_PROF_POINT(pa_handle_subscription)
11 13
 DECLARE_PROF_POINT(pa_timer_presentity)
12 14
 DECLARE_PROF_POINT(pa_timer_pdomain)
... ...
@@ -30,6 +32,17 @@ void ser_profile_init();
30 32
 
31 33
 #define SER_PROFILE_INIT	ser_profile_init();
32 34
 
33
-#endif
35
+#else /* don't profile */
36
+
37
+#define SER_PROFILE_INIT
38
+#define PROF_START(name)
39
+#define PROF_START_BODY(name)
40
+#define PROF_START_DECL(name)
41
+#define PROF_STOP(name)
42
+
43
+#endif /* DO_PROFILING */
44
+
45
+#endif /* SER */
46
+
34 47
 
35 48
 #endif