Symbian3/PDK/Source/GUID-D5984540-A411-52ED-B435-94C67F34ADD5.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-D5984540-A411-52ED-B435-94C67F34ADD5" xml:lang="en"><title>How
to Enable Tracing</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>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. </p>
<section><title>Enabling traces during build-time</title> <p>To enable tracing
at build-time, the Instrumentor has to include the <codeph>#define SYMBIAN_TRACE_ENABLE</codeph> 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 trace configuration tool. </p> <p>If the requirement is to enable
tracing in all the files in an executable, the Instrumentor can achieve this
by adding <codeph>MACRO           SYMBIAN_TRACE_ENABLE</codeph> to the MMP
file of the project. </p> </section>
<section><title>Enabling traces during run-time</title> <p>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. </p><p><b>Considerations</b></p><p>Before enabling trace points,
the Trace Collector has to consider the  following two options of outputting
traces:</p><ul>
<li><p><b>Outputting all traces from a component or a set of components:</b> After
the traces have been enabled at build time by the Instrumentor, the Trace
Collector will be able to generate the trace packets when the instrumented
component is executed, provided the trace configuration tool is configured
to filter in all of these traces. </p></li>
<li><p><b>Outputting some of the traces (subset) from one or more components:</b> The
Trace Collector can achieve this by enabling or disabling the predefined primary
and secondary filter combination used within the instrumented component. </p><p>The
Trace Collector is able to turn on any combination of filters for a component,
according to the scenarios presented in the Relationship between primary and
secondary filters section in <xref href="GUID-715D065D-4FF7-55D0-882E-3B37F36369C4.dita#GUID-715D065D-4FF7-55D0-882E-3B37F36369C4/GUID-A7E551D1-DED5-5BC7-A19F-523B65B2AE00">Key
concepts and terms</xref>. </p></li>
</ul> </section>
</conbody><related-links>
<link href="GUID-AFB1F350-C5D3-5495-AE20-1AA6888B6FB1.dita"><linktext>How to insert
trace points in a component</linktext></link>
</related-links></concept>