epoc32/include/f32dbg.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // f32\inc\f32dbg.h
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalTechnology
       
    23  @released
       
    24 */
       
    25 #if !defined(__F32DBG_H__)
       
    26 #define __F32DBG_H__
       
    27 #include <e32std.h>
       
    28 
       
    29 
       
    30 /**
       
    31 @publishedPartner
       
    32 @released
       
    33 
       
    34 A bit value indicating that tracing is to be active in
       
    35 file system code, when set through a call to RFs::SetDebugRegister()
       
    36 in _DEBUG or _DEBUG_RELEASE mode.
       
    37 */
       
    38 #define KFSYS       0x0001
       
    39 
       
    40 
       
    41 /**
       
    42 @publishedPartner
       
    43 @released
       
    44 
       
    45 A bit value indicating that tracing is to be active in
       
    46 file server code, when set through a call to RFs::SetDebugRegister()
       
    47 in _DEBUG or _DEBUG_RELEASE mode.
       
    48 */
       
    49 #define KFSERV      0x0002
       
    50 
       
    51 
       
    52 /**
       
    53 @publishedPartner
       
    54 @released
       
    55 
       
    56 A bit value indicating that tracing is to be active in
       
    57 the loader code, when set through a call to RFs::SetDebugRegister()
       
    58 in _DEBUG or _DEBUG_RELEASE mode.
       
    59 */
       
    60 #define KFLDR       0x0004
       
    61 
       
    62 
       
    63 /**
       
    64 @publishedPartner
       
    65 @released
       
    66 
       
    67 A bit value indicating that the number of (simulated) allocation
       
    68 failures to complete a given function is to be printed, when set
       
    69 through a call to RFs::SetDebugRegister() in _DEBUG or _DEBUG_RELEASE mode.
       
    70 */
       
    71 #define KALLOC		0x0008
       
    72 
       
    73 
       
    74 /**
       
    75 @publishedPartner
       
    76 @released
       
    77 
       
    78 A bit value indicating that tracing is to be active in
       
    79 LFFS code, when set through a call to RFs::SetDebugRegister()
       
    80 in _DEBUG or _DEBUG_RELEASE mode.
       
    81 */
       
    82 #define KLFFS		0x0010
       
    83 
       
    84 
       
    85 /**
       
    86 @publishedPartner
       
    87 @released
       
    88 
       
    89 A bit value indicating that tracing is to be active in
       
    90 ISO9660 code, when set through a call to RFs::SetDebugRegister()
       
    91 in _DEBUG or _DEBUG_RELEASE mode.
       
    92 */
       
    93 #define	KISO9660	0x0020
       
    94 
       
    95 
       
    96 /**
       
    97 @publishedPartner
       
    98 @released
       
    99 
       
   100 A bit value indicating that tracing is to be active in
       
   101 NTFS code, when set through a call to RFs::SetDebugRegister()
       
   102 in _DEBUG or _DEBUG_RELEASE mode.
       
   103 */
       
   104 #define	KNTFS		0x0040
       
   105 
       
   106 
       
   107 /**
       
   108 @publishedPartner
       
   109 @released
       
   110 
       
   111 A bit value indicating that tracing is to be active in
       
   112 ROFS code, when set through a call to the function RFs::SetDebugRegister()
       
   113 in _DEBUG or _DEBUG_RELEASE mode.
       
   114 */
       
   115 #define	KROFS		0x0080
       
   116 
       
   117 
       
   118 /**
       
   119 @publishedPartner
       
   120 @released
       
   121 
       
   122 A bit value indicating that tracing is to be active in
       
   123 concurrent file system code, when set through a call to the function RFs::SetDebugRegister()
       
   124 in _DEBUG or _DEBUG_RELEASE mode.
       
   125 */
       
   126 #define KTHRD		0x0100
       
   127 
       
   128 /**
       
   129 @internalTechnology
       
   130 */
       
   131 #define KCACHE		0x0200
       
   132 
       
   133 
       
   134 /**
       
   135 @internalTechnology
       
   136 @prtototype
       
   137 
       
   138 A bit value indicating that tracing is to be active in
       
   139 COMPFS code, when set through a call to the function RFs::SetDebugRegister()
       
   140 in _DEBUG or _DEBUG_RELEASE mode.
       
   141 */
       
   142 #define	KCOMPFS		0x0400
       
   143 
       
   144 
       
   145 
       
   146 // #define _DEBUG_RELEASE
       
   147 
       
   148 const TInt KAllocFailureOn=0;
       
   149 const TInt KAllocFailureOff=-1;
       
   150 
       
   151 
       
   152 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
       
   153 const TInt KControlIoCancelNCNotifier=KMaxTInt-1;
       
   154 const TInt KControlIoNCDebugNotifierOn=KMaxTInt-2;
       
   155 const TInt KControlIoNCDebugNotifierOff=KMaxTInt-3;
       
   156 const TInt KControlIoGetCorruptLogRecord=KMaxTInt-4;
       
   157 const TInt KControlIoGetNumberOfCorruptLogRecords=KMaxTInt-5;
       
   158 const TInt KControlIoGetCorruptListFile=KMaxTInt-6;
       
   159 const TInt KControlIoCorruptLogRecordReset=KMaxTInt-7;
       
   160 const TInt KControlIoCacheCount=KMaxTInt-8;
       
   161 const TInt KControlIoGetLocalDriveNumber=KMaxTInt-9;
       
   162 const TInt KControlIoCancelDeferredDismount=KMaxTInt-10;
       
   163 const TInt KControlIoFileCacheFlagsWrite=KMaxTInt-11;
       
   164 const TInt KControlIoFileCacheStats=KMaxTInt-12;
       
   165 const TInt KControlIoFlushClosedFiles=KMaxTInt-13;
       
   166 const TInt KControlIoSimulateLockFailureMode=KMaxTInt-14;
       
   167 const TInt KControlIoFileCacheDump=KMaxTInt-15;
       
   168 const TInt KControlIoAllocateMaxSegments=KMaxTInt-16;
       
   169 
       
   170 const TInt KControlIoDisableFatUtilityFunctions=KMaxTInt-17;
       
   171 const TInt KControlIoEnableFatUtilityFunctions=KMaxTInt-18;
       
   172 const TInt KControlIoFileCacheConfig=KMaxTInt-19;
       
   173 const TInt KControlIoSimulateFileCacheWriteFailure=KMaxTInt-20;
       
   174 
       
   175 const TInt KNCDebugNotifierValue=-500000;	// between 0 and 1 second
       
   176 
       
   177 GLREF_D TInt DebugNCNotifier;
       
   178 
       
   179 class TIOCacheValues
       
   180 	{ 
       
   181 public:
       
   182 	TInt iFreeCount;	// number of requests on free queue
       
   183 	TInt iCloseCount;	// number of requests on close queue
       
   184 	TInt iAllocated;	// number of dynamically allocated requests
       
   185 	TInt iTotalCount;	// number of permanently & dynamically allocated requests
       
   186 	};
       
   187 
       
   188 class TFileCacheStats
       
   189 	{ 
       
   190 public:
       
   191 	TInt iFreeCount;
       
   192 	TInt iUsedCount;
       
   193 	TInt iLockedSegmentCount;
       
   194 	TInt iAllocatedSegmentCount;
       
   195 	TInt iFileCount;
       
   196 	TInt iFilesOnClosedQueue;
       
   197 	TInt iHoleCount;
       
   198 
       
   199 	TInt iUncachedPacketsRead;
       
   200 	TInt iUncachedBytesRead;
       
   201 
       
   202 	TInt iUncachedPacketsWritten;
       
   203 	TInt iUncachedBytesWritten;
       
   204 
       
   205 	TInt iCommitFailureCount;
       
   206 	TInt iLockFailureCount;
       
   207 	};
       
   208 
       
   209 class TFileCacheConfig
       
   210 	{ 
       
   211 public:
       
   212 	TInt iDrive;
       
   213 	TInt iFlags;
       
   214 	TBool iFileCacheReadAsync;
       
   215 	TInt32 iFairSchedulingLen;			// in bytes
       
   216 	TInt32 iCacheSize;					// in bytes
       
   217 	TInt32 iMaxReadAheadLen;			// in bytes
       
   218 	TInt32 iClosedFileKeepAliveTime;	// in microseconds
       
   219 	TInt32 iDirtyDataFlushTime;			// in microseconds
       
   220 	};
       
   221 
       
   222 struct TFsDebugCorruptLogRecord
       
   223 	{
       
   224 	TFileName iProcessName;
       
   225 	TFileName iFileName;
       
   226 	TInt iError;
       
   227 	};
       
   228 
       
   229 typedef TPckgBuf <TFsDebugCorruptLogRecord> TFsDebugCorruptLogRecordBuf;
       
   230 
       
   231 extern TBool EnableFatUtilityFunctions;
       
   232 
       
   233 #endif
       
   234 
       
   235 enum TLoaderDebugFunction
       
   236 	{
       
   237 	ELoaderDebug_SetHeapFail,
       
   238 	ELoaderDebug_SetRFsFail
       
   239 	};
       
   240 
       
   241 
       
   242 enum TFsDebugFunction
       
   243 	{
       
   244 	EFsSetAllocFailure,
       
   245 	EFsSetErrorCondition,
       
   246 	EFsSetDebugRegister,
       
   247 	EFsDebugNotify
       
   248 	};
       
   249 
       
   250 #endif