sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/viewactivitygraph.htm
changeset 15 0367d2db2c06
parent 6 f65f740e69f9
equal deleted inserted replaced
14:bb339882c6e9 15:0367d2db2c06
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
     2 <html>
     2 <html>
     3 <head>
     3 <head>
     4 <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">
     5 <title>Viewing AnalyzeTool memory activity graphs</title>
     5   <title>Viewing AnalyzeTool memory activity graphs</title>
     6 <link href="../../book.css" type="text/css" rel="StyleSheet">
     6   <link href="../../book.css" type="text/css" rel="StyleSheet">
     7 </head>
     7 </head>
       
     8 
     8 <body>
     9 <body>
       
    10 <h2>Viewing memory activity graph</h2>
     9 
    11 
    10 <h2>Viewing memory activity graph</h2>
    12 <p>This section describe the AnalyzeTool Graph tab and gives instructions on
    11 <p>Memory activity graphs are generated automatically after the data capturing is stopped. Alternatively, an existing trace file can be opened to view memory activity graphs. For more information, see <a href="..\concepts\datafile.htm">AnalyzeTool files</a>.</p>
    13 using it. The following subsections are included:</p>
       
    14 <ul>
       
    15   <li><a href="#Descriptio">Description of graph</a></li>
       
    16   <li><a href="#Setting">Setting thresholds for displayed allocations</a></li>
       
    17   <li><a href="#Navigating">Navigating the graph</a></li>
       
    18   <li><a href="#Eclipse">The Eclipse Properties View</a></li>
       
    19 </ul>
       
    20 
       
    21 <p>Memory activity graphs are generated automatically after the data capturing
       
    22 is stopped. Alternatively, an existing trace file can be opened to view memory
       
    23 activity graphs. For more information, see <a
       
    24 href="..\concepts\datafile.htm">AnalyzeTool files</a>.</p>
       
    25 
    12 <p>There are two options for opening a memory analysis data file:</p>
    26 <p>There are two options for opening a memory analysis data file:</p>
    13 <ul>
    27 <ul>
    14 <li>From the <b>Project pop-up</b> menu, select <b>AnalyzeTool</b> > <b>Open and analyze data file</b>.</li>
    28   <li>From the <b>Project pop-up</b> menu, select <b>AnalyzeTool</b> &gt;
    15 <li>In the <b>AnalyzeTool</b> view, click the <b>Open and analyze data file</b> button.</li>
    29     <b>Open and analyze data file</b>.</li>
    16 </ul>
    30   <li>In the <b>AnalyzeTool</b> view, click the <b>Open and analyze data
    17 <p>Memory activity graphs are displayed in the <b>AnalyzeTool</b> window on the <b>Graph</b> tab. After the data has loaded, select a process in the <b>Process</b> drop down box to view its memory activity. </p>
    31     file</b> button.</li>
    18 <p><img src="../images/sample_graph.png" alt="AnalyzeTool graph tab"></p>
       
    19 
       
    20 <h3>Description of graph</h3>
       
    21 <p>The graph shows the cumulative memory of the given process over time. 
       
    22 Each memory operation is marked with a dot on the graph as follows:
       
    23 <ul>
       
    24 <li><font color="blue">Alloc</font>: A memory allocation is marked in blue if it is freed during the lifetime of the process.</li>
       
    25 <li><font color="red">Leak</font>: A memory allocation is marked in red with a vertical line going down if it is not freed during the lifetime of the process (also known as <em>leak</em>).</li>
       
    26 <li><font color="green">Free</font>: A memory free is marked in green.</li>
       
    27 </ul>
       
    28 <p>Hovering the mouse over a memory operation shows a tooltip with relevant information. 
       
    29 A memory operation can also be selected with a mouse click. This will highlight the memory operation on the graph, and 
       
    30 more detailed information is shown in the Eclipse Properties view. The Eclipse Properties view may include callstack information if available.
       
    31 <p><b>Tip</b>: Use the <b>arrow left</b> and <b>arrow right</b> keys to move to the next or previous memory operation.</p> 
       
    32 <p>When a memory operation is selected, related memory operations are highlighted on the graph. For example, when an alloc is selected, its associated free memory is marked on the graph with a green line going down.</p>
       
    33 
       
    34 <h3>Navigating the graph</h3>
       
    35 <ul>
       
    36 <li><b>Zoom in:</b> Select a region in the graph with your mouse (click the left edge and drag to the right edge of the region to be zoomed in).</li>
       
    37 <li><b>Zoom out:</b> Right-click with the mouse.</li>
       
    38 <li><b>Scroll:</b> Use the scroll bar. Alternatively, select a memory operation with your mouse and use the <b>arrow right</b> or <b>arrow left</b> keys to bring the next or previous into view.</li>
       
    39 </ul>
    32 </ul>
    40 
    33 
    41 <h3>The Eclipse Properties View</h3>
    34 <p>Memory activity graphs are displayed in the <b>AnalyzeTool</b> window on the
    42 <p>When a single memory allocation is selected on the graph, the Eclipse Properties view shows detailed information about the memory operation.
    35 <b>Graph</b> tab. After the data has loaded, select a process in the
    43 If the Eclipse Properties view is not already open, it can be opened by selecting <b>Windows</b> > <b>Show View</b> > <b>Properties</b>.
    36 <b>Process</b> drop down box to view its memory activity. </p>
    44 </p>
       
    45 <img src="../images/properties_view.png" alt="AnalyzeTool Properties View">
       
    46 <p>Double-clicking an item in the callstack opens the appropriate source code file to that code line, provided the source code file can be found in the selected project in Carbide.c++.</p>
       
    47 
    37 
       
    38 <p><img src="../images/graph_view.png" alt="AnalyzeTool graph tab"></p>
    48 
    39 
    49 <div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
    40 <p class="figure"
    50 License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
    41 style="text-align:left;margin-left:0;margin-right:auto;">Figure 1. Example
       
    42 graph</p>
       
    43 
       
    44 <h3 id="Descriptio">Description of graph</h3>
       
    45 
       
    46 <p>The graph shows the cumulative memory of the given process over time. Each
       
    47 memory operation is marked with a dot on the graph as follows: </p>
       
    48 <ul>
       
    49   <li><font color="blue">Alloc</font>: A memory allocation is marked in blue if
       
    50     it is freed during the lifetime of the process.</li>
       
    51   <li><font color="red">Leak</font>: A memory allocation is marked in red with
       
    52     a vertical line going down if it is not freed during the lifetime of the
       
    53     process (also known as <em>leak</em>).</li>
       
    54   <li><font color="green">Free</font>: A memory free is marked in green.</li>
       
    55 </ul>
       
    56 
       
    57 <p>Hovering the mouse over a memory operation shows a tooltip with relevant
       
    58 information. A memory operation can also be selected with a mouse click. This
       
    59 will highlight the memory operation on the graph, and more detailed information
       
    60 is shown in the Eclipse Properties view. The Eclipse Properties view may
       
    61 include callstack information if available. </p>
       
    62 
       
    63 <p><b>Tip</b>: Use the <b>arrow left</b> and <b>arrow right</b> keys to move to
       
    64 the next or previous memory operation.</p>
       
    65 
       
    66 <p>When a memory operation is selected, related memory operations are
       
    67 highlighted on the graph. For example, when an alloc is selected, its
       
    68 associated free memory is marked on the graph with a green line going down.</p>
       
    69 
       
    70 <h3 id="Setting">Setting thresholds for displayed allocations</h3>
       
    71 
       
    72 <p>You can set a threshold for the minimum or maximum size of allocation
       
    73 displayed in the graph. To do this, click the <img
       
    74 src="../images/icon_graph_settings.png"> on the toolbar to open open the graph
       
    75 settings dialog. </p>
       
    76 
       
    77 <p><strong>Note</strong> that this option is not available in the optimized
       
    78 drawing mode, where only leaks are shown due to high number of memory
       
    79 operations.</p>
       
    80 
       
    81 <p><img src="../images/graph_settings_dialog.png"></p>
       
    82 
       
    83 <p class="figure"
       
    84 style="text-align:left;margin-left:0;margin-right:auto;">Figure 2. Graph
       
    85 Settings dialog</p>
       
    86 <ol>
       
    87   <li>Choose one of the radio buttons:</li>
       
    88 </ol>
       
    89 <ul>
       
    90   <li><strong>above or equals the threshold</strong> to display memory
       
    91     allocations which size is equal or above the set threshold, or </li>
       
    92   <li><strong>below or equals the threshold</strong> to display memory
       
    93     allocations which size is equal of below the set threshold. </li>
       
    94 </ul>
       
    95 <ul>
       
    96   <li>Type in the threshold. You can give the threshold in bytes, kilobytes or
       
    97     megabytes (B, kB, MB).</li>
       
    98   <li>Click Ok. The Graph will now display only the memory allocations within
       
    99     the set threshold. </li>
       
   100 </ul>
       
   101 
       
   102 <p>The figure below shows the same graph as in Figure 1. above, but now with
       
   103 threshold setting of 4kB.</p>
       
   104 
       
   105 <p><img src="../images/graph_view_threshold.png"
       
   106 alt="AnalyzeTool graph with threshold"></p>
       
   107 
       
   108 <p class="figure"
       
   109 style="text-align:left;margin-left:0;margin-right:auto;">Figure 3. Example
       
   110 graph with threshold set at 4 kB</p>
       
   111 
       
   112 <p>As you can see in Figure 3 above, memory leaks are always show on the graph,
       
   113 regardless of the threshold settings.</p>
       
   114 
       
   115 <p>The threshold setting is data file specific. So, if you choose another date
       
   116 file, there will be no thresholds applied to it by default, but you need to set
       
   117 them in the <strong>Graph Settings</strong> dialog.</p>
       
   118 
       
   119 <h3 id="Navigating">Navigating the graph</h3>
       
   120 <ul>
       
   121   <li><b>Zoom in:</b> Select a region in the graph with your mouse (click the
       
   122     left edge and drag to the right edge of the region to be zoomed in).</li>
       
   123   <li><b>Zoom out:</b> Right-click with the mouse.</li>
       
   124   <li><b>Scroll:</b> Use the scroll bar. Alternatively, select a memory
       
   125     operation with your mouse and use the <b>arrow right</b> or <b>arrow
       
   126     left</b> keys to bring the next or previous into view.</li>
       
   127 </ul>
       
   128 
       
   129 <h3 id="Eclipse">The Eclipse Properties View</h3>
       
   130 
       
   131 <p>When a single memory allocation is selected on the graph, the Eclipse
       
   132 Properties view shows detailed information about the memory operation. If the
       
   133 Eclipse Properties view is not already open, it can be opened by clicking the
       
   134 <img src="../images/properties.png"> icon on the Graph tab, or by selecting
       
   135 <b>Windows</b> &gt; <b>Show View</b> &gt; <b>Properties</b>. </p>
       
   136 <img src="../images/properties_view.png" alt="AnalyzeTool Properties View"> 
       
   137 
       
   138 <p class="figure"
       
   139 style="text-align:left;margin-left:0;margin-right:auto;">Figure 4. Properties
       
   140 view</p>
       
   141 
       
   142 <p>Double-clicking an item in the callstack opens the appropriate source code
       
   143 file to that code line, provided the source code file can be found in the
       
   144 selected project in Carbide.c++.</p>
       
   145 
       
   146 <div id="footer">
       
   147 Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
       
   148 reserved. License: <a
       
   149 href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
    51 </body>
   150 </body>
    52 </html>
   151 </html>