|
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-9E0957A1-0691-5741-ABCA-3EA61B4AC0CD" xml:lang="en"><title>Command |
|
13 Line Kernel Trace Tool Tutorial</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>This document explains how to use the BTrace.exe </p> |
|
15 <section id="GUID-29D33B54-F2BE-40D0-9D2F-66558C0C8FFC"><title>Purpose</title> <p>This document explains how to use the command |
|
16 line kernel trace tool to extract trace data from a device. </p> <p><b>Intended |
|
17 Audience</b> </p> <p>Developers who need to debug a device using the command |
|
18 line kernel trace tool. </p> <p><b>Required |
|
19 Background</b> </p> <p>An understanding of the trace macros in EUser. </p> <p><b>Introduction</b> </p> <p>The command line kernel trace tool is a command |
|
20 line tool which displays trace data produced by the BTrace framework. </p> <p><b>Setup and Configuration Requirements</b> </p> <p>The command line kernel |
|
21 trace tool is included in all Base Text-Shell ROMs but must be manually added |
|
22 to other kinds of ROM. </p> </section> |
|
23 <section id="GUID-F0D74D76-4170-4E65-8841-03CECEE29957"><title>Using Command Line Kernel Trace Tool</title> <p>The following |
|
24 tasks will be covered in this tutorial: </p> <ul> |
|
25 <li id="GUID-54E2AE6F-C032-577F-BB2F-2AC27A73D8DC"><p>Using the command line |
|
26 kernel trace tool to extract trace data. </p> </li> |
|
27 </ul> <p><b>Basic |
|
28 Procedure</b> </p> <p>The high level steps to setting a trace are shown here: </p> <ol id="GUID-A2BB2FC6-E7C9-5E2B-9A53-E2D62ED2A205"> |
|
29 <li id="GUID-135E6D0B-47AE-5CB6-9534-B88CAF4FC64A"><p>Determine the name of |
|
30 the executable to be traced. </p> </li> |
|
31 <li id="GUID-23569E4A-52E2-5222-BD3D-4F5F5FF1BA34"><p>Determine the category |
|
32 to be filtered. </p> </li> |
|
33 <li id="GUID-3FCAECEF-1D54-5650-A1E1-039B4C2CAB87"><p>Select a capture mode. </p> </li> |
|
34 <li id="GUID-77716523-09EA-5ED2-815F-8C3C6E3CE58F"><p>Choose a file to write |
|
35 to. </p> </li> |
|
36 <li id="GUID-69959204-5A29-549A-9B0C-73EED477E5C9"><p>Enter the appropriate |
|
37 commands into the command line. </p> </li> |
|
38 </ol> </section> |
|
39 <section id="GUID-AE55432C-95F7-4E5F-BC10-DFDC191FBF84"><title>Command syntax</title> <p>The syntax for the commands is this: </p> <codeblock id="GUID-34975380-97A0-542F-8459-EB7A361CBD17" xml:space="preserve">BTRACE [-fLIST] [-mN] [-bN] [-d] [filename]</codeblock> <p>where </p> <ul> |
|
40 <li id="GUID-37A52096-B364-5E6B-BA65-6F6E411144F5"><p> <codeph>LIST</codeph> stands |
|
41 for a list of comma separated category numbers, </p> </li> |
|
42 <li id="GUID-ECEBFD03-F333-5D02-83C4-08602C0C4142"><p> <codeph>-mN</codeph> stands |
|
43 for <codeph>-m</codeph> followed by an integer as defined in <xref href="GUID-9E859841-E8A3-37D5-9A19-BCAA3C700922.dita#GUID-9E859841-E8A3-37D5-9A19-BCAA3C700922/GUID-FD389070-4DFF-39F4-8942-90EFAADC5DCB"><apiname>RBTrace::TMode</apiname></xref>, </p> <ul> |
|
44 <li id="GUID-BEC2173E-3E31-550E-AAD7-24196939CB08"><p>0 trace disabled and |
|
45 new traces are discarded on overflow, </p> </li> |
|
46 <li id="GUID-230EC509-1BCA-52E2-A94D-C23F573AB33F"><p>1 trace enabled and |
|
47 new traces are discarded on overflow, </p> </li> |
|
48 <li id="GUID-309F041F-8952-5060-9977-1420E9648478"><p>2 trace disabled and |
|
49 old traces are discarded on overflow, </p> </li> |
|
50 <li id="GUID-E6AC8A4A-0581-5C7D-BF98-10718C61AAF9"><p>3 trace enabled and |
|
51 old traces are discarded on overflow, </p> </li> |
|
52 </ul> </li> |
|
53 <li id="GUID-A47CBDC1-2ACF-53A9-8E85-4D86640700C2"><p>-bN stands for the size |
|
54 in bytes of the capture buffer, </p> </li> |
|
55 <li id="GUID-A477E02A-49BC-502A-B425-DA3C9495DF3A"><p>-d causes the contents |
|
56 of the trace buffer to be dumped to the debug port, and </p> </li> |
|
57 <li id="GUID-EFC2A4F9-6B2A-5AD2-A723-0353C46844C2"><p>filename is the file |
|
58 to which the trace data is to be written. </p> </li> |
|
59 </ul> <p>Here is an example command: </p> <codeblock id="GUID-FF0234CE-437D-5827-AAA4-25FC8DF620EC" xml:space="preserve">BTRACE -f1,2,3 -m3 -b1024 |
|
60 MyTestProgram.exe |
|
61 BTRACE d:\MyLog.txt</codeblock> </section> |
|
62 </conbody><related-links> |
|
63 <link href="GUID-7EA3FAD3-9A41-5B2D-8F46-8C8965CE8B97.dita"><linktext>BTraceX Overview</linktext> |
|
64 </link> |
|
65 <link href="GUID-7B477BA5-CC5B-56A2-82BC-E1BC0049FECB.dita"><linktext>BTraceC Overview</linktext> |
|
66 </link> |
|
67 <link href="GUID-55C05441-33B5-5057-971D-4200345E941E.dita"><linktext>BTraceC Tutorial</linktext> |
|
68 </link> |
|
69 <link href="GUID-F27F49B3-4AC1-5517-AF3A-1ADBA1E87A0B.dita"><linktext> Command |
|
70 Line Kernel Trace Tool Overview</linktext></link> |
|
71 <link href="GUID-5CEA46BA-5AA2-51B4-8BBA-5B6EF141D68A.dita"><linktext> Reading |
|
72 Kernel Trace Data From Chunks Tutorial</linktext></link> |
|
73 <link href="GUID-7195C3C2-6DF4-56DE-B3C7-00CC10A22AD2.dita"><linktext>Writing Trace |
|
74 Data to Buffers Tutorial</linktext></link> |
|
75 <link href="GUID-625A116D-185D-57A3-9FB7-B8257F4AB1B2.dita"><linktext> Setting |
|
76 Trace Filters Tutorial</linktext></link> |
|
77 <link href="GUID-2341CFE1-1CDF-537A-99FB-78C59FFA30CE.dita"><linktext> Requesting |
|
78 Data Notification Tutorial</linktext></link> |
|
79 </related-links></concept> |