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