persistentstorage/sqlite3api/OsLayer/FileBuf64.cpp
branchRCL_3
changeset 9 667e88a979d7
parent 8 fa9941cf3867
child 23 26645d81f48d
equal deleted inserted replaced
8:fa9941cf3867 9:667e88a979d7
    18 ///////////////////////////        PROFILER       ////////////////////////////////////////////////////////////////////
    18 ///////////////////////////        PROFILER       ////////////////////////////////////////////////////////////////////
    19 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    19 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    20 
    20 
    21 #ifdef _SQLPROFILER
    21 #ifdef _SQLPROFILER
    22 
    22 
    23 extern TBool TheOsCallTimeDetailedProfileEnabled;//If true, the OS porting layer call details are enabled and for each call an entry will be added to the log file (epocwind.out).
       
    24 
       
    25 #define PROFILE_READ(pos,amount) \
    23 #define PROFILE_READ(pos,amount) \
    26 	do \
    24 	do \
    27 		{ \
    25 		{ \
    28 		if(TheOsCallTimeDetailedProfileEnabled) \
    26 		++iFileReadCount; iFileReadAmount += (amount); \
    29 			{ \
    27         RDebug::Print(_L(" -- FRead    this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileReadCount,  pos, amount, iFileReadAmount); \
    30 			++iFileReadCount; iFileReadAmount += (amount); \
       
    31 			RDebug::Print(_L(" -- FRead    this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileReadCount,  pos, amount, iFileReadAmount); \
       
    32 			} \
       
    33 		} while(0)
    28 		} while(0)
    34 	
    29 	
    35 #define PROFILE_WRITE(pos,amount) \
    30 #define PROFILE_WRITE(pos,amount) \
    36 	do \
    31 	do \
    37 		{ \
    32 		{ \
    38 		if(TheOsCallTimeDetailedProfileEnabled) \
    33 		++iFileWriteCount; iFileWriteAmount += (amount); \
    39 			{ \
    34 		RDebug::Print(_L(" -- FWrite   this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileWriteCount, pos, amount, iFileWriteAmount); \
    40 			++iFileWriteCount, iFileWriteAmount += (amount); \
       
    41 			RDebug::Print(_L(" -- FWrite   this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileWriteCount, pos, amount, iFileWriteAmount); \
       
    42 			} \
       
    43 		} while(0)
    35 		} while(0)
    44 
    36 
    45 #define PROFILE_SIZE() \
    37 #define PROFILE_SIZE() \
    46 	do \
    38 	do \
    47 		{ \
    39 		{ \
    48 		if(TheOsCallTimeDetailedProfileEnabled) \
    40 		++iFileSizeCount; \
    49 			{ \
    41 		RDebug::Print(_L(" -- FSize    this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSizeCount); \
    50 			++iFileSizeCount; \
       
    51 			RDebug::Print(_L(" -- FSize    this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSizeCount); \
       
    52 			} \
       
    53 		} while(0)
    42 		} while(0)
    54 
    43 
    55 #define PROFILE_SETSIZE() \
    44 #define PROFILE_SETSIZE() \
    56 	do \
    45 	do \
    57 		{ \
    46 		{ \
    58 		if(TheOsCallTimeDetailedProfileEnabled) \
    47 		++iFileSetSizeCount; \
    59 			{ \
    48 		RDebug::Print(_L(" -- FSetSize this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSetSizeCount); \
    60 			++iFileSetSizeCount; \
       
    61 			RDebug::Print(_L(" -- FSetSize this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSetSizeCount); \
       
    62 			} \
       
    63 		} while(0)
    49 		} while(0)
    64 
    50 
    65 #define PROFILE_FLUSH()	\
    51 #define PROFILE_FLUSH()	\
    66 	do \
    52 	do \
    67 		{ \
    53 		{ \
    68 		if(TheOsCallTimeDetailedProfileEnabled) \
    54 		++iFileFlushCount; \
    69 			{ \
    55 		RDebug::Print(_L(" -- FFlush   this=%X, Cnt=%d\r\n"), (TUint32)this, iFileFlushCount); \
    70 			++iFileFlushCount; \
       
    71 			RDebug::Print(_L(" -- FFlush   this=%X, Cnt=%d\r\n"), (TUint32)this, iFileFlushCount); \
       
    72 			} \
       
    73 		} while(0)
    56 		} while(0)
    74 
    57 
    75 #else
    58 #else
    76 
    59 
    77 #define PROFILE_READ(pos,amount)	void(0)
    60 #define PROFILE_READ(pos,amount)	void(0)