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