sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.doc.user/html/Getting_Started/example_project.htm
author Matti Laitinen <matti.t.laitinen@nokia.com>
Thu, 11 Feb 2010 15:32:31 +0200
changeset 2 b9ab3b238396
child 5 844b047e260d
permissions -rw-r--r--
Initial version of Performance Investigator under EPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     2
<title>Examining a Profiling Project</title>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     3
<link href="../../book.css" rel="stylesheet" type="text/css" />
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     4
</head><body>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     5
<h2><a name="example" id="example"></a>Examining a Profiling Project</h2>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     6
<p>The purpose of creating a profiling use case is to analyze the performance of Symbian OS applications. In general, the objective is to define the behavior of an application and its environment when they are interacting. When designing a profiling use case, it helps to document the process and save log files.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     7
<p>Existing test cases created by application developers or test personnel can be used as a template. However, consider the following when designing and preparing a test of a profiling use case.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     8
<p>High Profiler sampling rates can cause trace files to grow excessively large, especially if the test lasts for a long time. Therefore, it is recommended that the duration of the test be as short as possible. The maximum duration of a profiling test is typically two to three minutes. There should also be reasonable gaps between input events so that specific events can be easily detected and distinguished from the trace log.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     9
<p>The following example describes in a high-level how to search for performance bottlenecks. Refer to Figure 1 to illustrate an example of determining time spent in a particular application and the related functions consuming most of the CPU time.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    10
<p align="center"><img src="../images/GS_example_figure1.png" width="679" height="574" /></p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    11
<p align="center" class="figure">Figure 1. Examining a Specific Application</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    12
<p align="left">As shown in Figure 1, examine the thread load graph and select the time interval of interest. In this example, the selected time interval is 21.010 to 21.970 seconds.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    13
<p align="left">Figure 1 indicates the three most CPU time consuming threads in the time frame 21-22 seconds:</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    14
<ul>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    15
  <li>23.02% Null</li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    16
  <li>16.56% Wserv_36 </li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    17
  <li>15.31% Main_295</li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    18
</ul>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    19
<p>Notice that only <span class="code">Null (ekern.exe[1]::Null_0)</span> and<span class="code"> Wserv_36</span> are checked and thus are shown in the graph. To add or remove threads from the graph, use the shift and control keys to check or uncheck multiple lines. Right-click to display a context menu for more options.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    20
<p>You can determine which binaries are executed by the threads during the 21-22 second interval by right-clicking inside the table and selecting <strong>Thread &gt; Binary</strong>. This will change the graph displayed to the binary load graph in Figure 2.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    21
<p align="center"><img src="../images/GS_example_figure2.png" width="679" height="574" /></p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    22
<p align="center" class="figure">Figure 2. Binary Load Graph </p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    23
<p>As shown in Figure 2, this application spends 21.25% of the time in the <span class="code">_reka2_ekern.exe</span> binary. At the lowest level, you can find out which functions are executed by the binaries that execute during the 21-22 second interval by right-clicking inside either table and selecting <strong>Thread &gt; Binary &gt; Function</strong>. This will change the graph displayed to the function load graph in Figure 3.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    24
<p class="note"><strong>NOTE:</strong> For each selected binary in Figure 2, the Analyser graphs all of
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    25
that binary's samples, just as if you had selected that binary in the Binaries tab. The graph does not only
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    26
show binary samples that are also associated with threads
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    27
<span class="code">ekern.exe[1]::Null_0</span> and<span class="code"> Wserv_36</span>.
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    28
We expect to deliver that functionality in a future release. 
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    29
Keep this in mind as you drill down into a specific thread, binary, or function.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    30
<p align="center"><img src="../images/GS_example_figure3.png" width="679" height="574" /></p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    31
<p align="center" class="figure">Figure 3. Function Load Graph</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    32
<p>Figure 3 shows that 9.90% of the execution time was spent in a single function called NKern::RestoreInterrupts(int), within the _reka2_ekern.exe binary. In the Function table scroll to see the <strong>In Binary</strong> column to determine the binary containing the function.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    33
<p>Select the Function Calls tab to view the Function Call Analysis tables, as shown in Figure 4.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    34
<p align="center"><img src="../images/GS_example_figure4.png" width="682" height="574" /></p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    35
<p align="center" class="figure">Figure 4. Function Call Analysis</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    36
<p align="left">Individual functions can be selected to determine, within the time frame 21-22 seconds, which functions called the selected function and which functions were called by the selected function. You can sort functions by clicking the headings provided for each column.</p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    37
<p align="left"><strong>Related references</strong></p>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    38
<ul>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    39
  <li><a href="../reference/analyzer/GUI_tour.htm">Analyzer GUI Controls </a></li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    40
  <li><a href="../reference/analyzer/analyzing_table_data.htm">Analyzing Table Data</a> </li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    41
  <li><a href="../reference/analyzer/thread_load.htm">Thread Load</a></li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    42
  <li><a href="../reference/analyzer/binary_load.htm">Binary Load</a></li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    43
  <li><a href="../reference/analyzer/function_load.htm">Function Load</a></li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    44
  <li><a href="../reference/analyzer/function_calls.htm">Function Calls</a></li>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    45
</ul>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    46
<div id="footer">Copyright &copy; 2009 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>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    47
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    48
</body>
b9ab3b238396 Initial version of Performance Investigator under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    49
</html>