1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-D5984540-A411-52ED-B435-94C67F34ADD5" xml:lang="en"><title>How |
|
13 to Enable Tracing</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>Enabling a trace means that the trace adds trace packets to the output. |
|
15 A disabled trace adds no trace packets to the output. There are two options |
|
16 to enable tracing in the source code or component, depending on the tracing |
|
17 requirement. </p> |
|
18 <section><title>Enabling traces during build-time</title> <p>To enable tracing |
|
19 at build-time, the Instrumentor has to include the <codeph>#define SYMBIAN_TRACE_ENABLE</codeph> flag |
|
20 in the relevant source code (file) of the project. If it is not included, |
|
21 all traces will be excluded at the build time and it will not be possible |
|
22 for a Trace Collector to gather any trace information regardless of the filter |
|
23 settings in trace configuration tool. </p> <p>If the requirement is to enable |
|
24 tracing in all the files in an executable, the Instrumentor can achieve this |
|
25 by adding <codeph>MACRO SYMBIAN_TRACE_ENABLE</codeph> to the MMP |
|
26 file of the project. </p> </section> |
|
27 <section><title>Enabling traces during run-time</title> <p>To enable tracing |
|
28 at run-time, the Instrumentor has to have enabled traces at the build-time. |
|
29 That is, if the traces are enabled at build-time, the Trace Collector can |
|
30 enable or disable any traces at run-time. But if the traces for a particular |
|
31 component are disabled at build-time, the Trace Collector cannot enable them |
|
32 at run-time. </p><p><b>Considerations</b></p><p>Before enabling trace points, |
|
33 the Trace Collector has to consider the following two options of outputting |
|
34 traces:</p><ul> |
|
35 <li><p><b>Outputting all traces from a component or a set of components:</b> After |
|
36 the traces have been enabled at build time by the Instrumentor, the Trace |
|
37 Collector will be able to generate the trace packets when the instrumented |
|
38 component is executed, provided the trace configuration tool is configured |
|
39 to filter in all of these traces. </p></li> |
|
40 <li><p><b>Outputting some of the traces (subset) from one or more components:</b> The |
|
41 Trace Collector can achieve this by enabling or disabling the predefined primary |
|
42 and secondary filter combination used within the instrumented component. </p><p>The |
|
43 Trace Collector is able to turn on any combination of filters for a component, |
|
44 according to the scenarios presented in the Relationship between primary and |
|
45 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 |
|
46 concepts and terms</xref>. </p></li> |
|
47 </ul> </section> |
|
48 </conbody><related-links> |
|
49 <link href="GUID-AFB1F350-C5D3-5495-AE20-1AA6888B6FB1.dita"><linktext>How to insert |
|
50 trace points in a component</linktext></link> |
|
51 </related-links></concept> |
|