Browse Source

Add DBGLVL_PROFILE

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
f781a98ac4
1 changed files with 28 additions and 14 deletions
  1. 28
    14
      src/include/compiler.h

+ 28
- 14
src/include/compiler.h View File

@@ -133,12 +133,8 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
133 133
 			      const void *data, unsigned long len );
134 134
 
135 135
 /* Compatibility with existing Makefile */
136
-#if DEBUG_SYMBOL >= 1
137
-#if DEBUG_SYMBOL >= 2
138
-#define DBGLVL 3
139
-#else
140
-#define DBGLVL 1
141
-#endif
136
+#if DEBUG_SYMBOL
137
+#define DBGLVL DEBUG_SYMBOL
142 138
 #else
143 139
 #define DBGLVL 0
144 140
 #endif
@@ -147,6 +143,8 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
147 143
 #define DBG_LOG		( DBGLVL & DBGLVL_LOG )
148 144
 #define DBGLVL_EXTRA	2
149 145
 #define DBG_EXTRA	( DBGLVL & DBGLVL_EXTRA )
146
+#define DBGLVL_PROFILE	4
147
+#define DBG_PROFILE	( DBGLVL & DBGLVL_PROFILE )
150 148
 
151 149
 /**
152 150
  * Print debugging message if we are at a certain debug level
@@ -240,15 +238,31 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
240 238
 
241 239
 /* Versions of the DBGxxx_IF() macros that imply DBGxxx_IF( LOG, ... )*/
242 240
 
243
-#define DBG( ... )	DBG_IF ( LOG, __VA_ARGS__ )
244
-#define DBG_HDA( ... )	DBG_HDA_IF ( LOG, __VA_ARGS__ )
245
-#define DBG_HD( ... )	DBG_HD_IF ( LOG, __VA_ARGS__ )
246
-#define DBGC( ... )	DBGC_IF ( LOG, __VA_ARGS__ )
247
-#define DBGC_HDA( ... )	DBGC_HDA_IF ( LOG, __VA_ARGS__ )
248
-#define DBGC_HD( ... )	DBGC_HD_IF ( LOG, __VA_ARGS__ )
241
+#define DBG( ... )		DBG_IF		( LOG, __VA_ARGS__ )
242
+#define DBG_HDA( ... )		DBG_HDA_IF	( LOG, __VA_ARGS__ )
243
+#define DBG_HD( ... )		DBG_HD_IF	( LOG, __VA_ARGS__ )
244
+#define DBGC( ... )		DBGC_IF		( LOG, __VA_ARGS__ )
245
+#define DBGC_HDA( ... )		DBGC_HDA_IF	( LOG, __VA_ARGS__ )
246
+#define DBGC_HD( ... )		DBGC_HD_IF	( LOG, __VA_ARGS__ )
247
+
248
+/* Versions of the DBGxxx_IF() macros that imply DBGxxx_IF( EXTRA, ... )*/
249
+
250
+#define DBG2( ... )		DBG_IF		( EXTRA, __VA_ARGS__ )
251
+#define DBG2_HDA( ... )		DBG_HDA_IF	( EXTRA, __VA_ARGS__ )
252
+#define DBG2_HD( ... )		DBG_HD_IF	( EXTRA, __VA_ARGS__ )
253
+#define DBGC2( ... )		DBGC_IF		( EXTRA, __VA_ARGS__ )
254
+#define DBGC2_HDA( ... )	DBGC_HDA_IF	( EXTRA, __VA_ARGS__ )
255
+#define DBGC2_HD( ... )		DBGC_HD_IF	( EXTRA, __VA_ARGS__ )
256
+
257
+/* Versions of the DBGxxx_IF() macros that imply DBGxxx_IF( PROFILE, ... )*/
258
+
259
+#define DBGP( ... )		DBG_IF		( PROFILE, __VA_ARGS__ )
260
+#define DBGP_HDA( ... )		DBG_HDA_IF	( PROFILE, __VA_ARGS__ )
261
+#define DBGP_HD( ... )		DBG_HD_IF	( PROFILE, __VA_ARGS__ )
262
+#define DBGCP( ... )		DBGC_IF		( PROFILE, __VA_ARGS__ )
263
+#define DBGCP_HDA( ... )	DBGC_HDA_IF	( PROFILE, __VA_ARGS__ )
264
+#define DBGCP_HD( ... )		DBGC_HD_IF	( PROFILE, __VA_ARGS__ )
249 265
 
250
-/* Backwards compatibility */
251
-#define DBG2( ... )	DBG_IF ( EXTRA, __VA_ARGS__ )
252 266
 
253 267
 #if DEBUG_SYMBOL == 0
254 268
 #define NDEBUG

Loading…
Cancel
Save