sysperfana/memspyext/com.nokia.s60tools.memspy.help/html/reference/object_type.htm
changeset 7 8e12a575a9b5
equal deleted inserted replaced
6:f65f740e69f9 7:8e12a575a9b5
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
       
     2 <html>
       
     3 <head>
       
     4   <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
       
     5   <title>Object Type</title>
       
     6   <link href="../../book.css" type="text/css" rel="stylesheet">
       
     7 </head>
       
     8 
       
     9 <body>
       
    10 <h2>Object Type </h2>
       
    11 
       
    12 <p>The Object Type view presents the objects on the heap and their position
       
    13 within it, just as in the <strong>Cell Type</strong> view, but by tagging them
       
    14 with their C++ type name so that you can easily recognize the objects from your
       
    15 own code. Determining an object&rsquo;s type for display is usually possible
       
    16 for the majority of objects in the heap, but not for them all. An
       
    17 object&rsquo;s type can usually be determined if</p>
       
    18 <ul>
       
    19   <li>it is an instance of a C++ class with at least one (directly defined or
       
    20     inherited) virtual function, or</li>
       
    21   <li>it is a descriptor.</li>
       
    22 </ul>
       
    23 
       
    24 <p>If the object type cannot be determined, but there is a unique referrer for
       
    25 the object type, or if all referrers are of the same known type, <em>[Part of
       
    26 XXX]</em> is displayed, where XXX is the type of the referrer.</p>
       
    27 
       
    28 <p>Otherwise, <em>[Unknown]</em> is displayed.</p>
       
    29 
       
    30 <p>A virtual function in a class means each instance of that class will contain
       
    31 a vtable pointer. The vtable pointer can be used, in combination with the
       
    32 symbolic information provided at startup, to determine the name of the class
       
    33 associated with the vtable for presentation. Symbian&rsquo;s CBase defines a
       
    34 virtual destructor, so all conventional C-prefixed classes in Symbian will have
       
    35 a vtable and so be identifiable in this way.</p>
       
    36 
       
    37 <p>There are a number of possibilities, but an <em>[Unknown]</em> or <em>[Part
       
    38 of XXX]</em> object is typically either a raw (non-descriptor) data buffer, or
       
    39 sometimes a T-class allocated on the heap. Because such an object is often
       
    40 owned and encapsulated by an identifiable C-class, one effective strategy for
       
    41 identifying objects, which type cannot be determined, is to use the incoming
       
    42 reference information Heap Analyser constructs. If an otherwise unknown object
       
    43 type has this reference information, it is displayed in the view as <em>[Part
       
    44 of XXX]</em>, where XXX is the type of the referrer. In addition, if you
       
    45 right-click an <em></em>object and select <strong>Go to&hellip;</strong> &gt;
       
    46 <strong>Incoming reference</strong>, the context menu will display the types of
       
    47 the objects that refer to the <em></em>object. In fact there are a number of
       
    48 ways of visualizing object reference relationships available from the
       
    49 right-click context menu, including drawing the link relationships between
       
    50 objects as an overlay of dotted lines (right click and select
       
    51 <strong>Relationships&hellip;</strong> &gt; <strong>Incoming</strong> &gt;
       
    52 <strong>Breadcrumbs</strong>).</p>
       
    53 
       
    54 <p>Colours are chosen arbitrarily on a type-by-type basis in this view, with
       
    55 the exception of descriptors (Yellow), <em>[Unknown]</em> and <em>[Part of
       
    56 XXX]</em> (Red), and free space (Blue). The colour allocation can be viewed and
       
    57 refined by clicking <strong>Set Filters</strong>. This filter settings panel is
       
    58 also useful for focusing down on just object types of particular interest;
       
    59 click <strong>Enable None</strong>, then selectively enable just the types you
       
    60 are interested in. To get an overview, select <strong>View</strong> &gt;
       
    61 <strong>Size</strong> &gt; <strong>Small</strong>.</p>
       
    62 
       
    63 <p><img src="../images/ha_heap_view_object_type.png"></p>
       
    64 
       
    65 <h5>Related references</h5>
       
    66 <ul>
       
    67   <li><a href="cell_type.htm">Cell Type</a></li>
       
    68   <li><a href="parent_binary.htm">Parent Binary</a></li>
       
    69   <li><a href="cell_lenght.htm">Cell Lenght</a></li>
       
    70   <li><a href="isolation.htm">Isolation and Pervasiveness</a></li>
       
    71   <li><a href="HA_data_analysis.htm">Data analysis with Heap Analyser</a></li>
       
    72 </ul>
       
    73 
       
    74 <div id="footer">
       
    75 Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
       
    76 reserved. License: <a
       
    77 href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
       
    78 </body>
       
    79 </html>