This document describes how to enable trace points in the file server client API (EFSRV.DLL), the file system API (*.FSY) , and/or the proxy drive API.
Enabling a trace point results in trace data being output to the trace buffer.
Tracing can be enabled or disabled (i.e. compiled in or out) at build time. By default file server tracing is enabled in debug builds of EFSRV.DLL and EFILE.EXE and disabled in release builds. To enable tracing in release builds, there are two options:
replace the release builds of EFSRV.DLL / EFILE.EXE with their debug equivalents.
rebuild EFSRV.DLL / EFILE.EXE using efsrv_instrumented.mmp / efile_instrumented.mmp .
Tracing can also be enabled or disabled at run time or at device startup. For more information, see Symbian^3 Tools Guide > Debugging .
The level of tracing required may be configured by selecting one or more of the primary filters and one or more of the secondary filters from the list below:
//Primary filters EPanic = 192 // to trace panics EError = 193 // to trace errors EBorder = 195, // to trace API calls
//Secondary filters EF32TraceUidEfsrv = 0x100039e4 // (268450276 in decimal) EF32TraceUidFileSys = 0x10286575 // (271082869 in decimal) EF32TraceUidProxyDrive = 0x10286576 // (271082870 in decimal)
For more information on capturing the trace data, see Symbian^3 Tools Guide > Debugging .
The following table lists the classes to which the trace points have been added. It has been divided into three broad categories as shown below.
Trace points have been added to the public exported functions of the classes listed above. As an example, the code fragment below illustrates how the tracepoints have been added and what type of information is output for the Open function of the RFile class:
EFSRV_EXPORT_C TInt RFile::Open(RFs& aFs,const TDesC& aName,TUint aMode) { TRACEMULT3(UTF::EBorder, UTraceModuleEfsrv::EFileOpen, MODULEUID, aFs.Handle(), aMode, aName); aMode &= ~EFileBigFile; TInt r = CreateSubSession(aFs,EFsFileOpen,TIpcArgs(&aName,aMode)); TRACERET2(UTF::EBorder, UTraceModuleEfsrv::EFileOpenReturn, MODULEUID, r, SubSessionHandle()); return r; }
A sample trace output is as shown:
RFile::Open() sess 0x00008000 mode 0x00000100 FileName Z:\SYS\DATA\ESTARTFILESYSTEMS.TXT
Symbian does not currently provide a tool for decoding file server trace data (though hopefully this will change in the near future). The data can, however, be interpreted by examining the following two publicly exported header files which provides detail of what fields are output by each tracepoint.
For example:
/** @SYMTraceFormatString "RFile::Replace() sess %x mode %x FileName %*S" */ EFileReplace
In the above example the trace record will contain the session RFs handle, the file open mode and the filename.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.