1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/userlibandfileserver/fileserver/inc/f32dbg.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,265 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// f32\inc\f32dbg.h
1.18 +//
1.19 +// WARNING: This file contains some APIs which are internal and are subject
1.20 +// to change without notice. Such APIs should therefore not be used
1.21 +// outside the Kernel and Hardware Services package.
1.22 +//
1.23 +
1.24 +/**
1.25 + @file
1.26 + @internalTechnology
1.27 + @released
1.28 +*/
1.29 +#if !defined(__F32DBG_H__)
1.30 +#define __F32DBG_H__
1.31 +#include <e32std.h>
1.32 +#include <e32std_private.h>
1.33 +
1.34 +
1.35 +/**
1.36 +@publishedPartner
1.37 +@released
1.38 +
1.39 +A bit value indicating that tracing is to be active in
1.40 +file system code, when set through a call to RFs::SetDebugRegister()
1.41 +in _DEBUG or _DEBUG_RELEASE mode.
1.42 +*/
1.43 +#define KFSYS 0x0001
1.44 +
1.45 +
1.46 +/**
1.47 +@publishedPartner
1.48 +@released
1.49 +
1.50 +A bit value indicating that tracing is to be active in
1.51 +file server code, when set through a call to RFs::SetDebugRegister()
1.52 +in _DEBUG or _DEBUG_RELEASE mode.
1.53 +*/
1.54 +#define KFSERV 0x0002
1.55 +
1.56 +
1.57 +/**
1.58 +@publishedPartner
1.59 +@released
1.60 +
1.61 +A bit value indicating that tracing is to be active in
1.62 +the loader code, when set through a call to RFs::SetDebugRegister()
1.63 +in _DEBUG or _DEBUG_RELEASE mode.
1.64 +*/
1.65 +#define KFLDR 0x0004
1.66 +
1.67 +
1.68 +/**
1.69 +@publishedPartner
1.70 +@released
1.71 +
1.72 +A bit value indicating that the number of (simulated) allocation
1.73 +failures to complete a given function is to be printed, when set
1.74 +through a call to RFs::SetDebugRegister() in _DEBUG or _DEBUG_RELEASE mode.
1.75 +*/
1.76 +#define KALLOC 0x0008
1.77 +
1.78 +
1.79 +/**
1.80 +@publishedPartner
1.81 +@released
1.82 +
1.83 +A bit value indicating that tracing is to be active in
1.84 +LFFS code, when set through a call to RFs::SetDebugRegister()
1.85 +in _DEBUG or _DEBUG_RELEASE mode.
1.86 +*/
1.87 +#define KLFFS 0x0010
1.88 +
1.89 +
1.90 +/**
1.91 +@publishedPartner
1.92 +@released
1.93 +
1.94 +A bit value indicating that tracing is to be active in
1.95 +ISO9660 code, when set through a call to RFs::SetDebugRegister()
1.96 +in _DEBUG or _DEBUG_RELEASE mode.
1.97 +*/
1.98 +#define KISO9660 0x0020
1.99 +
1.100 +
1.101 +/**
1.102 +@publishedPartner
1.103 +@released
1.104 +
1.105 +A bit value indicating that tracing is to be active in
1.106 +NTFS code, when set through a call to RFs::SetDebugRegister()
1.107 +in _DEBUG or _DEBUG_RELEASE mode.
1.108 +*/
1.109 +#define KNTFS 0x0040
1.110 +
1.111 +
1.112 +/**
1.113 +@publishedPartner
1.114 +@released
1.115 +
1.116 +A bit value indicating that tracing is to be active in
1.117 +ROFS code, when set through a call to the function RFs::SetDebugRegister()
1.118 +in _DEBUG or _DEBUG_RELEASE mode.
1.119 +*/
1.120 +#define KROFS 0x0080
1.121 +
1.122 +
1.123 +/**
1.124 +@publishedPartner
1.125 +@released
1.126 +
1.127 +A bit value indicating that tracing is to be active in
1.128 +concurrent file system code, when set through a call to the function RFs::SetDebugRegister()
1.129 +in _DEBUG or _DEBUG_RELEASE mode.
1.130 +*/
1.131 +#define KTHRD 0x0100
1.132 +
1.133 +/**
1.134 +@internalTechnology
1.135 +*/
1.136 +#define KCACHE 0x0200
1.137 +
1.138 +
1.139 +/**
1.140 +@internalTechnology
1.141 +@prototype
1.142 +
1.143 +A bit value indicating that tracing is to be active in
1.144 +COMPFS code, when set through a call to the function RFs::SetDebugRegister()
1.145 +in _DEBUG or _DEBUG_RELEASE mode.
1.146 +*/
1.147 +#define KCOMPFS 0x0400
1.148 +
1.149 +
1.150 +/**
1.151 +@internalTechnology
1.152 +@prototype
1.153 +
1.154 +A bit value indicating that tracing is to be active in
1.155 +file server plugin support code, when set through a call
1.156 +to the function RFs::SetDebugRegister()
1.157 +*/
1.158 +#define KPLUGIN 0x0800
1.159 +
1.160 +
1.161 +// #define _DEBUG_RELEASE
1.162 +
1.163 +const TInt KAllocFailureOn=0;
1.164 +const TInt KAllocFailureOff=-1;
1.165 +
1.166 +
1.167 +#if defined(_DEBUG) || defined(_DEBUG_RELEASE)
1.168 +const TInt KControlIoCancelNCNotifier=KMaxTInt-1;
1.169 +const TInt KControlIoNCDebugNotifierOn=KMaxTInt-2;
1.170 +const TInt KControlIoNCDebugNotifierOff=KMaxTInt-3;
1.171 +const TInt KControlIoGetCorruptLogRecord=KMaxTInt-4;
1.172 +const TInt KControlIoGetNumberOfCorruptLogRecords=KMaxTInt-5;
1.173 +const TInt KControlIoGetCorruptListFile=KMaxTInt-6;
1.174 +const TInt KControlIoCorruptLogRecordReset=KMaxTInt-7;
1.175 +const TInt KControlIoCacheCount=KMaxTInt-8;
1.176 +const TInt KControlIoGetLocalDriveNumber=KMaxTInt-9;
1.177 +const TInt KControlIoCancelDeferredDismount=KMaxTInt-10;
1.178 +const TInt KControlIoFileCacheFlagsWrite=KMaxTInt-11;
1.179 +const TInt KControlIoFileCacheStats=KMaxTInt-12;
1.180 +const TInt KControlIoFlushClosedFiles=KMaxTInt-13;
1.181 +const TInt KControlIoSimulateLockFailureMode=KMaxTInt-14;
1.182 +const TInt KControlIoFileCacheDump=KMaxTInt-15;
1.183 +const TInt KControlIoAllocateMaxSegments=KMaxTInt-16;
1.184 +
1.185 +const TInt KControlIoDisableFatUtilityFunctions=KMaxTInt-17;
1.186 +const TInt KControlIoEnableFatUtilityFunctions=KMaxTInt-18;
1.187 +const TInt KControlIoFileCacheConfig=KMaxTInt-19;
1.188 +const TInt KControlIoSimulateFileCacheWriteFailure=KMaxTInt-20;
1.189 +
1.190 +const TInt KNCDebugNotifierValue=-500000; // between 0 and 1 second
1.191 +
1.192 +GLREF_D TInt DebugNCNotifier;
1.193 +
1.194 +class TIOCacheValues
1.195 + {
1.196 +public:
1.197 + TInt iFreeCount; // number of requests on free queue
1.198 + TInt iCloseCount; // number of requests on close queue
1.199 + TInt iAllocated; // number of dynamically allocated requests
1.200 + TInt iTotalCount; // number of permanently & dynamically allocated requests
1.201 + };
1.202 +
1.203 +class TFileCacheStats
1.204 + {
1.205 +public:
1.206 + TInt iFreeCount;
1.207 + TInt iUsedCount;
1.208 + TInt iLockedSegmentCount;
1.209 + TInt iAllocatedSegmentCount;
1.210 + TInt iFileCount;
1.211 + TInt iFilesOnClosedQueue;
1.212 + TInt iHoleCount;
1.213 +
1.214 + TInt iUncachedPacketsRead;
1.215 + TInt iUncachedBytesRead;
1.216 +
1.217 + TInt iUncachedPacketsWritten;
1.218 + TInt iUncachedBytesWritten;
1.219 +
1.220 + TInt iCommitFailureCount;
1.221 + TInt iLockFailureCount;
1.222 +
1.223 + TInt iWriteThroughWithDirtyDataCount;
1.224 + };
1.225 +
1.226 +class TFileCacheConfig
1.227 + {
1.228 +public:
1.229 + TInt iDrive;
1.230 + TInt iFlags;
1.231 + TBool iFileCacheReadAsync;
1.232 + TInt32 iFairSchedulingLen; // in bytes
1.233 + TInt32 iCacheSize; // in bytes
1.234 + TInt32 iMaxReadAheadLen; // in bytes
1.235 + TInt32 iClosedFileKeepAliveTime; // in microseconds
1.236 + TInt32 iDirtyDataFlushTime; // in microseconds
1.237 + };
1.238 +
1.239 +struct TFsDebugCorruptLogRecord
1.240 + {
1.241 + TFileName iProcessName;
1.242 + TFileName iFileName;
1.243 + TInt iError;
1.244 + };
1.245 +
1.246 +typedef TPckgBuf <TFsDebugCorruptLogRecord> TFsDebugCorruptLogRecordBuf;
1.247 +
1.248 +extern TBool EnableFatUtilityFunctions;
1.249 +
1.250 +#endif
1.251 +
1.252 +enum TLoaderDebugFunction
1.253 + {
1.254 + ELoaderDebug_SetHeapFail,
1.255 + ELoaderDebug_SetRFsFail
1.256 + };
1.257 +
1.258 +
1.259 +enum TFsDebugFunction
1.260 + {
1.261 + EFsSetAllocFailure,
1.262 + EFsSetErrorCondition,
1.263 + EFsSetDebugRegister,
1.264 + EFsDebugNotify
1.265 + };
1.266 +
1.267 +#endif
1.268 +