predictivesearch/PcsUtils/inc/CPcsDebug.h
branchRCL_3
changeset 6 e8e3147d53eb
parent 0 e686773b3f54
--- a/predictivesearch/PcsUtils/inc/CPcsDebug.h	Fri Mar 12 15:41:25 2010 +0200
+++ b/predictivesearch/PcsUtils/inc/CPcsDebug.h	Mon Mar 15 12:39:26 2010 +0200
@@ -24,11 +24,15 @@
 #include <f32file.h>
 
 
-#ifdef _DEBUG
+//==============================================================================
+// winscw udeb
+//------------------------------------------------------------------------------
 
 #ifdef __WINS__
+#ifdef _DEBUG
+
 #define PRINT( txt )                                \
-    { TBuf<512> __buf; __buf.Format(txt);                          RDebug::Print( _L("[PCS] %S"), &__buf );  }
+    { TBuf<512> __buf; __buf.Format(txt);                          RDebug::Print( _L("[PCS] %S"), &__buf ); }
 #define PRINT1( txt, arg1 )                         \
     { TBuf<512> __buf; __buf.Format(txt,arg1);                     RDebug::Print( _L("[PCS] %S"), &__buf ); }
 #define PRINT2( txt, arg1, arg2 )                   \
@@ -39,8 +43,18 @@
     { TBuf<512> __buf; __buf.Format(txt, arg1,arg2,arg3,arg4);     RDebug::Print( _L("[PCS] %S"), &__buf ); }
 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) \
     { TBuf<512> __buf; __buf.Format(txt,arg1,arg2,arg3,arg4,arg5); RDebug::Print( _L("[PCS] %S"), &__buf ); }
+#define PRINT_BOOT_PERFORMANCE( txt )
+#define PRINT1_BOOT_PERFORMANCE( txt, arg1 )
 
-#else
+#endif // _DEBUG
+#endif // __WINS__
+
+//==============================================================================
+// armv5 udeb
+//------------------------------------------------------------------------------
+
+#ifndef __WINS__
+#ifdef _DEBUG
 
 #include <flogger.h>
 
@@ -48,6 +62,22 @@
 _LIT(KLogDir,         "Pcs");
 _LIT(KLogFile,        "PcsServer.txt");
 
+//#define __BOOT_PERFORMANCE
+#ifdef __BOOT_PERFORMANCE // Boot Peformance logs only
+
+#define PRINT( txt )
+#define PRINT1( txt, arg1 )
+#define PRINT2( txt, arg1, arg2 )
+#define PRINT3( txt, arg1, arg2, arg3 )
+#define PRINT4( txt, arg1, arg2, arg3, arg4 )
+#define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 )
+#define PRINT_BOOT_PERFORMANCE( txt )                                \
+    RFileLogger::Write(KLogDir,KLogFile,EFileLoggingModeAppend,txt);
+#define PRINT1_BOOT_PERFORMANCE( txt, arg1 )                         \
+    RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1);
+
+#else
+
 #define PRINT( txt )                                \
     RFileLogger::Write(KLogDir,KLogFile,EFileLoggingModeAppend,txt);
 #define PRINT1( txt, arg1 )                         \
@@ -60,10 +90,19 @@
     RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3,arg4);
 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) \
     RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3,arg4,arg5);
+#define PRINT_BOOT_PERFORMANCE( txt )
+#define PRINT1_BOOT_PERFORMANCE( txt, arg1 )
+
+#endif // __BOOT_PERFORMANCE
 
 #endif // __WINS__
+#endif // _DEBUG
 
-#else
+//==============================================================================
+// winscw urel AND armv5 urel
+//------------------------------------------------------------------------------
+
+#ifndef _DEBUG
 
 #define PRINT( txt )
 #define PRINT1( txt, arg1 )
@@ -71,23 +110,24 @@
 #define PRINT3( txt, arg1, arg2, arg3 )
 #define PRINT4( txt, arg1, arg2, arg3, arg4 )
 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 )
+#define PRINT_BOOT_PERFORMANCE( txt )
+#define PRINT1_BOOT_PERFORMANCE( txt, arg1 )
 
 #endif // _DEBUG
 
+//==============================================================================
+
+
 #ifdef _DEBUG
-
 #define PRINTQUERY( txt, queryArg )         CPcsDebug::PrintQueryL(txt, queryArg);
 #define PRINTQUERYLIST( txt, queryListArg ) CPcsDebug::PrintQueryListL(txt, queryListArg);
 #define PRINTMATCHLOC( txt, matchLocsArg )  CPcsDebug::PrintMatchLoc(txt, matchLocsArg);
 #define PRINTMATCHSET( txt, matchSetArg )   CPcsDebug::PrintMatchSet(txt, matchSetArg);
-
 #else
-
 #define PRINTQUERY( txt, queryArg )
 #define PRINTQUERYLIST( txt, queryListArg )
 #define PRINTMATCHLOC( txt, matchLocsArg )
 #define PRINTMATCHSET( txt, matchSetArg )
-
 #endif // _DEBUG
 
 #define __LATENCY_MARK( str )     CPcsDebugWrapper::__LatencyMarkStartL(str);