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