diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-8105D1FC-DFFE-59F0-A664-3DA44F002F47.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-8105D1FC-DFFE-59F0-A664-3DA44F002F47.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,93 @@ + + + + + +Enabling +File Server TracingThis 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. +
Introduction

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 details, see How +to enable tracing.

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 details on capturing the trace data see how +to output traces.

+
APIs

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.

    +
  • File system

      +
    • CFileSystem

    • +
    • CMountCB

    • +
    • CFileCB

    • +
    • CDirCB

    • +
    • CFormatCB

    • +
  • +
  • Proxy drive

      +
    • CLocalProxyDrive

    • +
    • CBaseExtProxyDrive

    • +
  • +
  • File server

      +
    • RFile

    • +
    • RFs

    • +
    • RDir

    • +
    • RFormat

    • +
    • RPlugin

    • +
    • CFileMan

    • +
    • CDirScan

    • +
  • +

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
+
Interpretation of the trace data

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.

    +
  • \epoc32\include\utraceefsrv.h

  • +
  • \epoc32\include\utraceefile.h

  • +

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.

+
+Unified Trace +solution +Kernel Trace +Tool Overview +
\ No newline at end of file