sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.doc.user/html/Getting_Started/example_project.htm
changeset 2 b9ab3b238396
child 5 844b047e260d
equal deleted inserted replaced
1:1050670c6980 2:b9ab3b238396
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>
       
     2 <title>Examining a Profiling Project</title>
       
     3 <link href="../../book.css" rel="stylesheet" type="text/css" />
       
     4 </head><body>
       
     5 <h2><a name="example" id="example"></a>Examining a Profiling Project</h2>
       
     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>
       
     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>
       
     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>
       
     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>
       
    10 <p align="center"><img src="../images/GS_example_figure1.png" width="679" height="574" /></p>
       
    11 <p align="center" class="figure">Figure 1. Examining a Specific Application</p>
       
    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>
       
    13 <p align="left">Figure 1 indicates the three most CPU time consuming threads in the time frame 21-22 seconds:</p>
       
    14 <ul>
       
    15   <li>23.02% Null</li>
       
    16   <li>16.56% Wserv_36 </li>
       
    17   <li>15.31% Main_295</li>
       
    18 </ul>
       
    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>
       
    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>
       
    21 <p align="center"><img src="../images/GS_example_figure2.png" width="679" height="574" /></p>
       
    22 <p align="center" class="figure">Figure 2. Binary Load Graph </p>
       
    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>
       
    24 <p class="note"><strong>NOTE:</strong> For each selected binary in Figure 2, the Analyser graphs all of
       
    25 that binary's samples, just as if you had selected that binary in the Binaries tab. The graph does not only
       
    26 show binary samples that are also associated with threads
       
    27 <span class="code">ekern.exe[1]::Null_0</span> and<span class="code"> Wserv_36</span>.
       
    28 We expect to deliver that functionality in a future release. 
       
    29 Keep this in mind as you drill down into a specific thread, binary, or function.</p>
       
    30 <p align="center"><img src="../images/GS_example_figure3.png" width="679" height="574" /></p>
       
    31 <p align="center" class="figure">Figure 3. Function Load Graph</p>
       
    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>
       
    33 <p>Select the Function Calls tab to view the Function Call Analysis tables, as shown in Figure 4.</p>
       
    34 <p align="center"><img src="../images/GS_example_figure4.png" width="682" height="574" /></p>
       
    35 <p align="center" class="figure">Figure 4. Function Call Analysis</p>
       
    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>
       
    37 <p align="left"><strong>Related references</strong></p>
       
    38 <ul>
       
    39   <li><a href="../reference/analyzer/GUI_tour.htm">Analyzer GUI Controls </a></li>
       
    40   <li><a href="../reference/analyzer/analyzing_table_data.htm">Analyzing Table Data</a> </li>
       
    41   <li><a href="../reference/analyzer/thread_load.htm">Thread Load</a></li>
       
    42   <li><a href="../reference/analyzer/binary_load.htm">Binary Load</a></li>
       
    43   <li><a href="../reference/analyzer/function_load.htm">Function Load</a></li>
       
    44   <li><a href="../reference/analyzer/function_calls.htm">Function Calls</a></li>
       
    45 </ul>
       
    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>
       
    47 
       
    48 </body>
       
    49 </html>