|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
2 <html> |
|
3 <head> |
|
4 <title>Instrumenting traces</title> |
|
5 <link href="../../book.css" type="text/css" rel="stylesheet"></head> |
|
6 <body> |
|
7 |
|
8 <h2>Instrumenting traces</h2> |
|
9 <p>To instrument traces to your source code, do the following: </p> |
|
10 <ol> |
|
11 <li>From the TraceBuilder menu, select <b>Instrument Code</b>. </li> |
|
12 <li>Select a group for your traces or define a new one by typing the name |
|
13 into the <b>Trace Group</b> field. </li> |
|
14 <li>Type a name format for your traces. |
|
15 <p>The default is <b>{$CN}_{$FN}</b>, which means |
|
16 <code>className_functionName</code>. </p> |
|
17 <p>The values for <code>className</code> and <code>functionName</code> |
|
18 are parsed from the source code.</p></li> |
|
19 <li>Type a text format for your traces. |
|
20 <p>The default is <b>{$cn}::{$fn}</b>, which means |
|
21 <code>className::functionName</code>. </p> |
|
22 <p>The values for <code>className</code> and <code>functionName</code> |
|
23 are parsed from the source code.</p></li> |
|
24 <li>(Optional) From the <b>Templates</b> list, you can select pre-defined |
|
25 format for the trace. |
|
26 <p>For example, <i>Function entry-exit</i> template parses the name |
|
27 of the class and function where the cursor is currently located. |
|
28 An entry trace is added to the beginning of the function and the exit trace |
|
29 is added to the end.</p></li> |
|
30 <li>(Optional) Select any of the following options, as needed: |
|
31 <ul> |
|
32 <li><b>Add "this" pointer parameter</b> to add <i>this</i> pointer to the |
|
33 instrumented traces. </li> |
|
34 <li><b>Add function parameters</b> to add function parameters to the instrumented |
|
35 traces. </li> |
|
36 <li><b>Add exit traces</b> to add exit trace to every function instrumented. |
|
37 <b>Note:</b> this option is selected only if the <i>Function Entry-Exit</i> template |
|
38 is selected.</li> |
|
39 <li><b>Add return value to exit traces</b> to add a function return value |
|
40 to every function that is instrumented.</li> |
|
41 </ul> |
|
42 </li> |
|
43 <li>Click <b>OK</b>. </li> |
|
44 <li>In the displayed dialog, select the functions you want to instrument.</li> |
|
45 <li>Click <b>OK</b> to start instrumentation of the source code. </li> |
|
46 </ol> |
|
47 |
|
48 <h5>Related tasks</h5> |
|
49 <ul> |
|
50 <li><a href="addingparameters.htm">Adding parameters to traces</a></li> |
|
51 <li><a href="deletingtraces.htm">Deleting traces</a></li> |
|
52 </ul> |
|
53 |
|
54 <h5>Related concepts</h5> |
|
55 <ul> |
|
56 <li><a href="../concepts/trace_format.htm">Open System Trace (OST)</a></li> |
|
57 </ul> |
|
58 |
|
59 <div id="footer">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
60 License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div> |
|
61 </body> |
|
62 </html> |