1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 |
|
3 <html> |
2 <html> |
4 <head> |
3 <head> |
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
4 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> |
6 <title>Using the Profiler</title> |
5 <title>Using the Profiler</title> |
7 <link href="../../../book.css" rel="stylesheet" type="text/css"> |
6 <link href="../../../book.css" rel="stylesheet" type="text/css"> |
8 <style type="text/css"> |
7 <style type="text/css"> |
9 <!-- |
8 <!-- |
10 .style1 {font-family: "Courier New", Courier, mono} |
9 .style1 {font-family: "Courier New", Courier, mono} |
11 --> |
10 --> |
12 </style> |
11 |
|
12 </style> |
13 </head> |
13 </head> |
14 |
14 |
15 <body> |
15 <body> |
16 <h2>Using the Profiler</h2> |
16 <h2>Using the Profiler</h2> |
|
17 |
17 <h4>Overview</h4> |
18 <h4>Overview</h4> |
18 <p>After successfully <a href="../../tasks/profiler/prof_installation.htm">installing</a> the Profiler .SISX file on your target device, you will be able to access the user interface. Run the <b>CarbidePI</b> application located in the “Installed” applications (Figure 1).</p> |
19 |
19 <table width="600" border="1" align="center"> |
20 <p>After successfully <a |
20 <tr align="center"> |
21 href="../../tasks/profiler/prof_installation.htm">installing</a> the Profiler |
21 <td><b>S60</b></td> |
22 .SISX file on your target device, you will be able to access the user |
22 <td><b>UIQ</b></td> |
23 interface. Run the <b>CarbidePI</b> application located in the |
23 </tr> |
24 “Installed” applications (Figure 1).</p> |
24 <tr align="center"> |
25 <p align="center"><img src="../profiler/images/SamplingProfilerMainWindow.png" ></p> |
25 <td width="50%"><div align="center"><img src="../profiler/images/SamplingProfilerMainWindow.png" width="264" height="312"></div></td> |
26 |
26 <td><div align="center"><img src="images/uiq_using_the_profiler.png" width="240" height="320"></div></td> |
27 |
27 </tr> |
28 |
28 </table> |
29 <p align="center" class="figure">Figure 1 - Profiler Main Window (S60) </p> |
29 <p align="center" class="figure">Figure 1 - Profiler Main Window (S60 and UIQ) </p> |
30 |
30 <p>In Options, configure the necessary run-time options. Specify which traces you want enabled, where to place the generated .dat profiler data file, the profiler file prefix, and the trace priority sampling interval.</p> |
31 <p>In Options, configure the necessary run-time options. Specify which traces |
31 <p>In the Profiler, the Address/Thread trace is <strong>always</strong> active when profiling is performed. Other traces are synchronized with the Address/Thread trace.</p> |
32 you want enabled, where to place the generated .dat profiler data file, the |
32 <p>In addition to Address/Thread trace, you can enable additional trace options such as dynamic binary support, memory and power usage, and function calls.</p> |
33 profiler file prefix, and the trace priority sampling interval.</p> |
|
34 |
|
35 <p>In the Profiler, the Address/Thread trace is <strong>always</strong> active |
|
36 when profiling is performed. Other traces are synchronized with the |
|
37 Address/Thread trace.</p> |
|
38 |
|
39 <p>In addition to Address/Thread trace, you can enable additional trace options |
|
40 such as dynamic binary support, memory and power usage, and function calls.</p> |
|
41 |
33 <div class="step"> |
42 <div class="step"> |
34 <h4>Profiling an Application</h4> |
43 <h4>Profiling an Application</h4> |
35 <ol> |
44 <ol> |
36 <li>Open the Profiler options screen |
45 <li>Open the Profiler options screen |
37 <p>Select the Tracing options menu from the Profiler menu (Figure 2)</p> |
46 <p>Select the Tracing options menu from the Profiler menu (Figure 2) </p> |
38 </li> |
47 <p align="center"><img src="images/TracingOptions.png"></p> |
39 <blockquote> |
48 </li> |
40 <table width="600" border="1" align="center"> |
|
41 <tr align="center"> |
|
42 <td><b>S60</b></td> |
|
43 <td><b>UIQ</b></td> |
|
44 </tr> |
|
45 <tr align="center"> |
|
46 <td width="50%"><div align="center"><img src="../profiler/images/TracingOptions.png" width="264" height="312"></div></td> |
|
47 <td><div align="center"><img src="images/TracingOptions_uiq.png" width="240" height="320"></div></td> |
|
48 </tr> |
|
49 </table> |
|
50 </blockquote> |
|
51 <blockquote> |
|
52 <p align="center" class="figure">Figure 2 - Tracing Options</p> |
|
53 </blockquote> |
|
54 <li>Enable or disable trace options</li> |
|
55 |
49 |
56 <p>Specify On or Off for the available trace items - Dynamic binary support, Function call capture, and Thread priority capture. (Figure 3).</p> |
50 <p class="figure">Figure 2 - Tracing Options</p> |
57 <blockquote> |
51 <li>Enable or disable trace options</li> |
58 <p align="left" class="note"><b>NOTE</b> If the executables you wish to analyze are not in a ROM image (.symbol file) of your target device, then you will need to turn on Dynamic binary support.</p> |
52 |
59 </blockquote> |
53 <p>Specify On or Off for the available trace items - Dynamic binary support, |
60 <table width="600" border="1" align="center"> |
54 Function call capture, and Thread priority capture. (Figure 3).</p> |
61 <tr align="center"> |
55 |
62 <td><b>S60</b></td> |
56 <blockquote> |
63 <td><b>UIQ</b></td> |
57 <p align="left" class="note"><b>NOTE</b> If the executables you wish to |
64 </tr> |
58 analyze are not in a ROM image (.symbol file) of your target device, then |
65 <tr align="center"> |
59 you will need to turn on Dynamic binary support.</p> |
66 <td width="50%"><div align="center"><img src="../profiler/images/TracingOptionsList.png" width="264" height="312"><img src="images/TracingOptionsList2.png" width="264" height="312"></div></td> |
60 |
67 <td><div align="center"><img src="images/uiq_setting_tracing_options.png" width="240" height="320"></div></td> |
61 |
68 </tr> |
62 |
69 </table> |
63 <p align="center"><img src="../profiler/images/TracingOptionsList.png" ></p> |
70 <p align="center" class="figure">Figure 3 - List of Trace Items</p> |
64 |
71 <li>Specify Output</li> |
65 <p align="center"><img src="../profiler/images/TracingOptionsList2.png" ></p> |
72 <p>Specify the output for the sampled data (Figure 4). The output method can be either the <span class="style1">File system</span> or <span class="style1">Debug port</span>. If you select File system, you can save the data file to a memory card or the target device C:\ drive. With the debug port output method, you will need hardware (such as the Nokia Musti box) connected to the XTI/STI debug port to capture the profiler data. There is less profiler overhead if the debug port is used.</p> |
66 |
73 <table width="600" border="1" align="center"> |
67 |
74 <tr align="center"> |
68 <p align="center" class="figure">Figure 3 - List of Trace Items</p> |
75 <td><b>S60</b></td> |
69 <li>Specify Output</li> |
76 <td><b>UIQ</b></td> |
70 |
77 </tr> |
71 <p>Specify the output for the sampled data (Figure 4). The output method can |
78 <tr align="center"> |
72 be either the <span class="style1">File system</span> or <span |
79 <td width="50%"><div align="center"><img src="../profiler/images/OutputOptionsWindow_FileSystem.png" width="264" height="312"></div></td> |
73 class="style1">Debug port</span>. If you select File system, you can save the |
80 <td><div align="center"><img src="images/uiq_setting_output_settings.png" width="240" height="320"></div></td> |
74 data file to a memory card or the target device C:\ drive. With the debug |
81 </tr> |
75 port output method, you will need hardware (such as the Nokia Musti box) |
82 </table> |
76 connected to the XTI/STI debug port to capture the profiler data. There is |
83 <p align="center" class="figure">Figure 4 - Output Options</p> |
77 less profiler overhead if the debug port is used.</p> |
84 <p>You can specify the file prefix for data files. The name of the profiler data file is formed from the prefix plus stream.dat. If you perform multiple traces and use the file output option, include a hash mark (#) in your file prefix. Subsequent traces will then be saved with different file names. The hash mark is automatically replaced with a number. For example, if you define the file prefix as <span class="style1">PI_#_</span>, multiple trace files will be named <span class="style1">PI_1_STREAM.dat, PI_2_STREAM.dat, … PI_100_STREAM.dat</span>. Only one hash mark is needed to provide sequential numbering. |
78 <p align="center"> |
85 If no hash mark is present, the same file will be overwritten with the same name.</p> |
79 <img src="../profiler/images/OutputOptionsWindow_FileSystem.png" |
86 <p class="note"><strong>NOTE</strong> Currently, files names should be 19 characters or less.</p> |
80 ></p> |
87 <li>Specify Advanced Options</li> |
81 |
88 <p>In Advanced options, specify the thread priority sample interval (Figure 5). The operating system is called automatically every millisecond to determine what thread is currently executing. This interval setting indicates how often an additional query to the operating system is made to determine the priority of the currently executing thread. The interval is specified in milliseconds. The default is 3000 milliseconds (3 seconds). You can get a thread priority as often as you like but be aware that frequent sampling of the OS may skew the performance measurement while making the call. There is a significant overhead to obtaining the priorities of all threads.</p> |
82 |
89 <p>You can choose an address/thread sampling interval between 1ms and 10000ms (10 seconds). For intervals greater than 1 ms, memory, power, priority and button events are sampled periodically; not every millisecond. Memory and button events are individual events. For memory and priority the current memory size and priority are recorded before entering the time interval, then changes during the interval are recorded and the final memory size and priority when it exits the interval is recorded.</p> |
83 |
90 <table width="600" border="1" align="center"> |
84 <p align="center" class="figure">Figure 4 - Output Options</p> |
91 <tr align="center"> |
85 |
92 <td><b>S60</b></td> |
86 <p>You can specify the file prefix for data files. The name of the profiler |
93 <td><b>UIQ</b></td> |
87 data file is formed from the prefix plus stream.dat. If you perform multiple |
94 </tr> |
88 traces and use the file output option, include a hash mark (#) in your file |
95 <tr align="center"> |
89 prefix. Subsequent traces will then be saved with different file names. The |
96 <td width="50%"><div align="center"><img src="../profiler/images/AdvancedOptionsEditBox.png" width="240" height="320"></div></td> |
90 hash mark is automatically replaced with a number. For example, if you define |
97 <td><div align="center"><img src="images/uiq_setting_advanced_settings.png" width="240" height="320"></div></td> |
91 the file prefix as <span class="style1">PI_#_</span>, multiple trace files |
98 </tr> |
92 will be named <span class="style1">PI_1_STREAM.dat, PI_2_STREAM.dat, … |
99 </table> |
93 PI_100_STREAM.dat</span>. Only one hash mark is needed to provide sequential |
100 <p align="center" class="figure">Figure 5 - Priority sample interval</p> |
94 numbering. If no hash mark is present, the same file will be overwritten with |
101 <li>Profile your application</li> |
95 the same name.</p> |
102 <p>After establishing your desired options, select <strong>Options > Profiler > Start</strong> from the main window (Figure 6) to begin sampling. On UIQ devices you will see the state of the profiler change from “Ready” to “Initializing”, and then to “Profiling”. On S60 3.x devices the state will change from "Initializing" to "Sampling" and then "Finished". When the state has changed to “Profiling” or "Sampling", the trace activity has begun. Note that none of the configurations can be changed when the tracing is active.</p> |
96 |
103 <p class="note"> <b>IMPORTANT!</b> After the trace activity has started, leave the Profiler running in the background. Now you can proceed with the use case you wish to analyze. For example, run your application on the device.</p> |
97 <p class="note"><strong>NOTE</strong> Currently, files names should be 19 |
104 <table width="600" border="1" align="center"> |
98 characters or less.</p> |
105 <tr align="center"> |
99 <li>Specify Advanced Options</li> |
106 <td><b>S60</b></td> |
100 |
107 <td><b>UIQ</b></td> |
101 <p>In Advanced options, specify the thread priority sample interval (Figure |
108 </tr> |
102 5). The operating system is called automatically every millisecond to |
109 <tr align="center"> |
103 determine what thread is currently executing. This interval setting indicates |
110 <td width="50%"><div align="center"><img src="images/profiler_start_profiler.png" width="264" height="312"></div></td> |
104 how often an additional query to the operating system is made to determine |
111 <td><div align="center"><img src="images/profiler_start_profiler_uiq.png" width="240" height="320"></div></td> |
105 the priority of the currently executing thread. The interval is specified in |
112 </tr> |
106 milliseconds. The default is 3000 milliseconds (3 seconds). You can get a |
113 </table> |
107 thread priority as often as you like but be aware that frequent sampling of |
114 <p align="center" class="figure">Figure 6 - Starting a trace session </p> |
108 the OS may skew the performance measurement while making the call. There is a |
115 <p>Stop the trace activity by switching back to the profiler and selecting <strong>Options > Profiler > Stop</strong>. Do not use the profiler while the trace data is being written to the data file. When the profiler is stopped, the profiler state shown in the main window will change from “profiling” to “stopping profiler”, and finally back to “ready”. The profiler data file is automatically written to the output previously selected. The actual amount of produced data depends on the length of time tracing was active and which trace options were selected. The Address/Thread trace alone produces approximately 1-4 Kbytes / second. Transfer the data file to your workstation to be analyzed with the analyzer.</p> |
109 significant overhead to obtaining the priorities of all threads.</p> |
116 </ol> |
110 |
|
111 <p>You can choose an address/thread sampling interval between 1ms and 10000ms |
|
112 (10 seconds). For intervals greater than 1 ms, memory, power, priority and |
|
113 button events are sampled periodically; not every millisecond. Memory and |
|
114 button events are individual events. For memory and priority the current |
|
115 memory size and priority are recorded before entering the time interval, then |
|
116 changes during the interval are recorded and the final memory size and |
|
117 priority when it exits the interval is recorded.</p> |
|
118 |
|
119 |
|
120 |
|
121 <p align="center"> |
|
122 <img src="../profiler/images/AdvancedOptionsEditBox.png" |
|
123 ></p> |
|
124 |
|
125 |
|
126 |
|
127 <p align="center" class="figure">Figure 5 - Priority sample interval</p> |
|
128 <li>Profile your application</li> |
|
129 |
|
130 <p>After establishing your desired options, select <strong>Options > |
|
131 Profiler > Start</strong> from the main window (Figure 6) to begin |
|
132 sampling.The state will change from "Initializing" to "Sampling" and then |
|
133 "Finished". When the state has changed to “Profiling” or |
|
134 "Sampling", the trace activity has begun. Note that none of the |
|
135 configurations can be changed when the tracing is active.</p> |
|
136 |
|
137 <p class="note"><b>IMPORTANT!</b> After the trace activity has started, leave |
|
138 the Profiler running in the background. Now you can proceed with the use case |
|
139 you wish to analyze. For example, run your application on the device.</p> |
|
140 |
|
141 |
|
142 |
|
143 <p align="center"> |
|
144 <img src="images/profiler_start_profiler.png" |
|
145 ></p> |
|
146 |
|
147 |
|
148 |
|
149 <p align="center" class="figure">Figure 6 - Starting a trace session </p> |
|
150 |
|
151 <p>Stop the trace activity by switching back to the profiler and selecting |
|
152 <strong>Options > Profiler > Stop</strong>. Do not use the profiler |
|
153 while the trace data is being written to the data file. When the profiler is |
|
154 stopped, the profiler state shown in the main window will change from |
|
155 “profiling” to “stopping profiler”, and finally back |
|
156 to “ready”. The profiler data file is automatically written to |
|
157 the output previously selected. The actual amount of produced data depends on |
|
158 the length of time tracing was active and which trace options were selected. |
|
159 The Address/Thread trace alone produces approximately 1-4 Kbytes / second. |
|
160 Transfer the data file to your workstation to be analyzed with the |
|
161 analyzer.</p> |
|
162 </ol> |
117 </div> |
163 </div> |
|
164 |
118 <p><strong>Related references </strong></p> |
165 <p><strong>Related references </strong></p> |
119 <ul> |
166 <ul> |
120 <li><a href="../../tasks/profiler/prof_installation.htm">Installing the Profiler on the Target Device</a></li> |
167 <li><a href="../../tasks/profiler/prof_installation.htm">Installing the |
121 <li><a href="../../tasks/analyser/an_load_trace_files.htm">Importing Profiler Data File for Analysis </a></li> |
168 Profiler on the Target Device</a></li> |
|
169 <li><a href="../../tasks/analyser/an_load_trace_files.htm">Importing Profiler |
|
170 Data File for Analysis </a></li> |
122 </ul> |
171 </ul> |
123 <div id="footer">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div> |
172 |
|
173 <div id="footer"> |
|
174 Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights |
|
175 reserved. <br> |
|
176 License: <a |
|
177 href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div> |
124 </body> |
178 </body> |
125 </html> |
179 </html> |