10
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
2 |
<html>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
3 |
<head>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
4 |
<title>Adding traces to the source code</title>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
5 |
<link href="../../book.css" type="text/css" rel="stylesheet"></head>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
6 |
<body>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
7 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
8 |
<h2>Adding traces to the source code</h2>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
9 |
<p>To add a new trace, do the following: </p>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
10 |
<ol>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
11 |
<li>Place the cursor in your source code where you want to add the trace.</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
12 |
<li>Click the TraceBuilder menu and select <b>Add New Trace</b>.</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
13 |
<li>In the <b>Add Trace</b> dialog, enter trace group, name, and text:
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
14 |
<ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
15 |
<li><b>Trace Group</b>: the trace group is needed when you want to activate
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
16 |
your traces from the device. There are some predefined groups which you
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
17 |
can use if your trace fits the purpose. You can also define your own group
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
18 |
just by typing to the field.</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
19 |
<li><b>Trace Name</b>: the trace name is needed for creating unique identifiers
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
20 |
for each OST trace so that they can be identified in the PC side.
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
21 |
The trace name must be unique.</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
22 |
<li><b>Trace Text</b>: enter here the string you want to see when you receive
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
23 |
the trace in TraceViewer.</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
24 |
<li>(Optional) From the <b>Templates</b> list, you can select pre-defined
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
25 |
format for the trace name and trace text.
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
26 |
<p>For example, <i>Function entry-exit</i> template parses the name of the
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
27 |
class and function where the cursor is currently located. An entry trace is
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
28 |
added to the beginning of the function and the exit trace is added to the end.</p></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
29 |
</ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
30 |
<p><img src="images/add_trace.png"></p>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
31 |
</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
32 |
<li>Click <b>OK</b>. You should get this kind of line to your source code:<br><br>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
33 |
<img src="images/ost_code.png"></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
34 |
</ol>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
35 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
36 |
<p>The trace is added to the defined location in the code, and details
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
37 |
such as the trace group are displayed in TraceBuilder's tree view. </p>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
38 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
39 |
<h5>Related tasks</h5>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
40 |
<ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
41 |
<li><a href="addingparameters.htm">Adding parameters to traces</a></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
42 |
<li><a href="instrumenting.htm">Instrumenting traces</a></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
43 |
</ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
44 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
45 |
<div id="footer">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
46 |
License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
47 |
</body>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
48 |
</html> |