Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to Enable Tracing

Enabling a trace means that the trace adds trace packets to the output. A disabled trace adds no trace packets to the output. There are two options to enable tracing in the source code or component, depending on the tracing requirement.

[Top]


Enabling traces during build-time

To enable tracing at build-time, the Instrumentor has to include the #define SYMBIAN_TRACE_ENABLE flag in the relevant source code (file) of the project. If it is not included, all traces will be excluded at the build time and it will not be possible for a Trace Collector to gather any trace information regardless of the filter settings in ULogger.

If the requirement is to enable tracing in all the files in an executable, the Instrumentor can achieve this by adding MACRO SYMBIAN_TRACE_ENABLE to the MMP file of the project. Further, at compile time, a Trace Collector can enable the pre-instrumented fast kernel traces by following the procedure given in Base How to BTrace.

[Top]


Enabling traces during run-time

To enable tracing at run-time, the Instrumentor has to have enabled traces at the build-time. That is, if the traces are enabled at build-time, the Trace Collector can enable or disable any traces at run-time. But if the traces for a particular component are disabled at build-time, the Trace Collector cannot enable them at run-time.

Considerations

Before enabling trace points, the Trace Collector has to consider the following two options of outputting traces :

[Top]


Enabling traces during the device startup

With the Unified Trace solution, the Trace Collector can obtain trace data during early boot by using the uloggersysstarter.exe executable file and the default configuration file (Z:\private\10273881).

To enable early tracing, the Trace Collector has to add uloggersysstarter.exe to the start-up module, which is relevant to their specific start-up mode, platform, and device.

Note:This module is responsible for coordinating the launch of all ROM-based components that must be available at device startup. For Symbian reference hardware it is provided by the optional replaceable system starter module.

Tracing during boot will then use the uloggerconfig.ini ULogger configuration file to determine what traces to output and how to do so. So it is important that the Trace Collector or ROM creator builds the correct one into the ROM. For more information on syntax and the behaviour of the, see ULogger command syntax.

Limitation

If there is a failure, the ULoggerSysStrater module does not report any errors to the Trace Collector, as there is no user interface at early device startup. The only indication of failure is that there is no log file. The failure can arise due to the following reasons:

See also