11
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 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 |
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
5 |
<title>When to use OST traces</title>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
6 |
<link href="../../book.css" type="text/css" rel="stylesheet"></head>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
7 |
<body>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
8 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
9 |
<h2>When to use OST traces</h2>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
10 |
<p>In general, it is not good idea to trace “just in case”,
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
11 |
or to see that everything works OK. Consider these points: </p>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
12 |
<ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
13 |
<li>Use traces to find the rough location of the problem and then use a debugger
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
14 |
for the rest of the job. You save time as you are able to see registers, call-stacks
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
15 |
and program variables. Do not debug using traces, it is very slow. </li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
16 |
<li>Some good cases to use tracing are:
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
17 |
<ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
18 |
<li>in code that manages error situations, </li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
19 |
<li>initialization or stopping of operation, </li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
20 |
<li>control operations that happen rarely (user input, for example). </li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
21 |
</ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
22 |
</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
23 |
<li>It is not recommended to add traces to code that is called very often,
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
24 |
as each software tracepoint causes performance overhead. When tracepoint is
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
25 |
not activated, some time is spent for checking if the trace is activated or
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
26 |
not. When tracepoint is activated, additional time is taken when sending it
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
27 |
to the trace port.</li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
28 |
<li>If you get error reports after your code has been submitted to the release,
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
29 |
well-planned traces can help you find out what went wrong and where to start
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
30 |
looking for the problem. You can even instruct the problem reporter to take
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
31 |
additional trace log with certain tracepoints enabled: <i>“Send us a
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
32 |
log where tracegroups X and Y from component Z are activated.” </i></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
33 |
</ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
34 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
35 |
<h5>Related concepts</h5>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
36 |
<ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
37 |
<li><a href="trace_format.htm">Trace formats</a></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
38 |
</ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
39 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
40 |
<h5>Related tasks</h5>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
41 |
<ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
42 |
<li><a href="../tasks/connect.htm">Connecting to the trace source</a></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
43 |
<li><a href="../tasks/decoding_traces.htm">Decoding binary traces with a Dictionary file</a></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
44 |
<li><a href="../tasks/traceactivation.htm">Activating traces</a></li>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
45 |
</ul>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
46 |
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
47 |
<div id="footer">Copyright © 2007-2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
48 |
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
|
49 |
</body>
|
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
50 |
</html> |