author | hgs |
Tue, 02 Nov 2010 15:42:21 +0000 | |
changeset 301 | 172f33f13d7d |
parent 300 | 1d28c8722707 |
permissions | -rw-r--r-- |
0 | 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 |
||
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
187 |
const TInt KControlIoSessionCount=KMaxTInt-21; |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
188 |
const TInt KControlIoObjectCount=KMaxTInt-22; |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
189 |
|
176 | 190 |
const TInt KControlIoIsFileSequential=KMaxTInt-23; |
191 |
const TInt KControlIoGlobalCacheConfig=KMaxTInt-24; |
|
192 |
const TInt KControlIoGlobalCacheInfo=KMaxTInt-25; |
|
193 |
const TInt KControlIoDirCacheConfig=KMaxTInt-26; |
|
194 |
const TInt KControlIoDirCacheInfo=KMaxTInt-27; |
|
195 |
const TInt KControlIoSimulateMemoryLow=KMaxTInt-28; |
|
196 |
const TInt KControlIoStopSimulateMemoryLow=KMaxTInt-29; |
|
197 |
||
300 | 198 |
const TInt KControlIoHeapCellCount=KMaxTInt-30; |
199 |
||
0 | 200 |
const TInt KNCDebugNotifierValue=-500000; // between 0 and 1 second |
201 |
||
202 |
GLREF_D TInt DebugNCNotifier; |
|
203 |
||
204 |
class TIOCacheValues |
|
205 |
{ |
|
206 |
public: |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
207 |
TInt iFreeCount; // current number of requests on free queue |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
208 |
TInt iCloseCount; // current number of requests on close queue |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
209 |
TInt iAllocated; // no longer used |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
210 |
TInt iTotalCount; // current number of requests |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
211 |
TInt iRequestCountPeak; // peak number of requests, i.e. peak value reached by iTotalCount |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
212 |
|
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
213 |
|
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
214 |
// the same again but for the OperationAllocator |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
215 |
TInt iOpFreeCount; |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
216 |
TInt iOpRequestCount; |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
217 |
TInt iOpRequestCountPeak; |
0 | 218 |
}; |
219 |
||
220 |
class TFileCacheStats |
|
221 |
{ |
|
222 |
public: |
|
223 |
TInt iFreeCount; |
|
224 |
TInt iUsedCount; |
|
225 |
TInt iLockedSegmentCount; |
|
226 |
TInt iAllocatedSegmentCount; |
|
227 |
TInt iFileCount; |
|
228 |
TInt iFilesOnClosedQueue; |
|
229 |
TInt iHoleCount; |
|
230 |
||
231 |
TInt iUncachedPacketsRead; |
|
232 |
TInt iUncachedBytesRead; |
|
233 |
||
234 |
TInt iUncachedPacketsWritten; |
|
235 |
TInt iUncachedBytesWritten; |
|
236 |
||
237 |
TInt iCommitFailureCount; |
|
238 |
TInt iLockFailureCount; |
|
239 |
||
240 |
TInt iWriteThroughWithDirtyDataCount; |
|
241 |
}; |
|
242 |
||
243 |
class TFileCacheConfig |
|
244 |
{ |
|
245 |
public: |
|
246 |
TInt iDrive; |
|
247 |
TInt iFlags; |
|
248 |
TBool iFileCacheReadAsync; |
|
249 |
TInt32 iFairSchedulingLen; // in bytes |
|
250 |
TInt32 iCacheSize; // in bytes |
|
251 |
TInt32 iMaxReadAheadLen; // in bytes |
|
252 |
TInt32 iClosedFileKeepAliveTime; // in microseconds |
|
253 |
TInt32 iDirtyDataFlushTime; // in microseconds |
|
254 |
}; |
|
255 |
||
256 |
struct TFsDebugCorruptLogRecord |
|
257 |
{ |
|
258 |
TFileName iProcessName; |
|
259 |
TFileName iFileName; |
|
260 |
TInt iError; |
|
261 |
}; |
|
262 |
||
263 |
typedef TPckgBuf <TFsDebugCorruptLogRecord> TFsDebugCorruptLogRecordBuf; |
|
264 |
||
265 |
extern TBool EnableFatUtilityFunctions; |
|
266 |
||
176 | 267 |
class TGlobalCacheConfig |
268 |
{ |
|
269 |
public: |
|
270 |
TInt32 iGlobalCacheSizeInBytes; // in bytes |
|
271 |
TInt32 iGlobalLowMemoryThreshold; // in percentage |
|
272 |
}; |
|
273 |
||
274 |
class TGlobalCacheInfo |
|
275 |
{ |
|
276 |
public: |
|
277 |
TInt32 iGlobalCacheSizeInBytes; // in bytes |
|
278 |
TInt32 iGlobalLowMemoryThreshold; // in percentage |
|
279 |
}; |
|
280 |
||
281 |
class TDirCacheConfig |
|
282 |
{ |
|
283 |
public: |
|
284 |
TInt iDrive; |
|
285 |
||
286 |
TInt32 iLeafDirCacheSize; // in number of most recently visited leaf directories |
|
287 |
TInt32 iDirCacheSizeMin; // in bytes |
|
288 |
TInt32 iDirCacheSizeMax; // in bytes |
|
289 |
}; |
|
290 |
||
291 |
class TDirCacheInfo |
|
292 |
{ |
|
293 |
public: |
|
294 |
TInt iDrive; |
|
295 |
||
296 |
/** |
|
297 |
Segment size in bytes. A memory segment is the smallest memory unit that Kernel manages through RChunk. |
|
298 |
*/ |
|
299 |
TInt32 iMemorySegmentSize; |
|
300 |
||
301 |
/** |
|
302 |
Size of memory a page occupies, in bytes. |
|
303 |
Note: following restrictions may result a difference between page size in memory & page size in data: |
|
304 |
1. page size can not be smaller than segment size |
|
305 |
2. one page can not contain data from two different clusters |
|
306 |
*/ |
|
307 |
TInt32 iPageSizeInMemory; |
|
308 |
||
309 |
/** |
|
310 |
Size of actual data a page contains, in bytes. |
|
311 |
Note: following restrictions may result a difference between page size in memory & page size in data: |
|
312 |
1. page size can not be smaller than segment size |
|
313 |
2. one page can not contain data from two different clusters |
|
314 |
*/ |
|
315 |
TInt32 iPageSizeInData; |
|
316 |
||
317 |
/** |
|
318 |
The minimum number of pages that the cache can contain, even under low memory conditions. |
|
319 |
*/ |
|
320 |
TInt32 iMinCacheSizeInPages; |
|
321 |
||
322 |
/** |
|
323 |
The maximum number of pages that the cache can contain, when there is enough free memory in the system. |
|
324 |
*/ |
|
325 |
TInt32 iMaxCacheSizeInPages; |
|
326 |
||
327 |
/** |
|
328 |
The minimum cache size in memory. In bytes. |
|
329 |
*/ |
|
330 |
TInt32 iMinCacheSizeInMemory; |
|
331 |
||
332 |
/** |
|
333 |
The maximum cache size in memroy. In bytes. |
|
334 |
*/ |
|
335 |
TInt32 iMaxCacheSizeInMemory; |
|
336 |
||
337 |
/** |
|
338 |
Current count of the locked pages. |
|
339 |
*/ |
|
340 |
TInt32 iLockedPageNumber; |
|
341 |
||
342 |
/** |
|
343 |
Current count of the unlocked pages. |
|
344 |
*/ |
|
345 |
TInt32 iUnlockedPageNumber; |
|
346 |
||
347 |
}; |
|
348 |
||
0 | 349 |
#endif |
350 |
||
351 |
enum TLoaderDebugFunction |
|
352 |
{ |
|
353 |
ELoaderDebug_SetHeapFail, |
|
354 |
ELoaderDebug_SetRFsFail |
|
355 |
}; |
|
356 |
||
357 |
||
358 |
enum TFsDebugFunction |
|
359 |
{ |
|
360 |
EFsSetAllocFailure, |
|
361 |
EFsSetErrorCondition, |
|
362 |
EFsSetDebugRegister, |
|
363 |
EFsDebugNotify |
|
364 |
}; |
|
365 |
||
366 |
#endif |
|
367 |