Home | History | Annotate | Download | only in pydoc
      1 
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      3 <html><head><title>Python: module telemetry.timeline.memory_dump_event</title>
      4 <meta charset="utf-8">
      5 </head><body bgcolor="#f0f0f8">
      6 
      7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
      8 <tr bgcolor="#7799ee">
      9 <td valign=bottom>&nbsp;<br>
     10 <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.timeline.html"><font color="#ffffff">timeline</font></a>.memory_dump_event</strong></big></big></font></td
     11 ><td align=right valign=bottom
     12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/timeline/memory_dump_event.py">telemetry/timeline/memory_dump_event.py</a></font></td></tr></table>
     13     <p><tt>#&nbsp;Copyright&nbsp;2015&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
     14 #&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
     15 #&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
     16 <p>
     17 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     18 <tr bgcolor="#aa55cc">
     19 <td colspan=3 valign=bottom>&nbsp;<br>
     20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
     21     
     22 <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="posixpath.html">posixpath</a><br>
     24 </td><td width="25%" valign=top><a href="re.html">re</a><br>
     25 </td><td width="25%" valign=top><a href="telemetry.timeline.event.html">telemetry.timeline.event</a><br>
     26 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
     27 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     28 <tr bgcolor="#ee77aa">
     29 <td colspan=3 valign=bottom>&nbsp;<br>
     30 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
     31     
     32 <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     33 <td width="100%"><dl>
     34 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
     35 </font></dt><dd>
     36 <dl>
     37 <dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#GlobalMemoryDump">GlobalMemoryDump</a>
     38 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#MemoryBucket">MemoryBucket</a>
     39 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#MmapCategory">MmapCategory</a>
     40 </font></dt></dl>
     41 </dd>
     42 <dt><font face="helvetica, arial"><a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
     43 </font></dt><dd>
     44 <dl>
     45 <dt><font face="helvetica, arial"><a href="telemetry.timeline.memory_dump_event.html#ProcessMemoryDumpEvent">ProcessMemoryDumpEvent</a>
     46 </font></dt></dl>
     47 </dd>
     48 </dl>
     49  <p>
     50 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     51 <tr bgcolor="#ffc8d8">
     52 <td colspan=3 valign=bottom>&nbsp;<br>
     53 <font color="#000000" face="helvetica, arial"><a name="GlobalMemoryDump">class <strong>GlobalMemoryDump</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
     54     
     55 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
     56 <td colspan=2><tt>Object&nbsp;to&nbsp;aggregate&nbsp;individual&nbsp;process&nbsp;dumps&nbsp;with&nbsp;the&nbsp;same&nbsp;dump&nbsp;id.<br>
     57 &nbsp;<br>
     58 Args:<br>
     59 &nbsp;&nbsp;process_dumps:&nbsp;A&nbsp;sequence&nbsp;of&nbsp;<a href="#ProcessMemoryDumpEvent">ProcessMemoryDumpEvent</a>&nbsp;objects,&nbsp;all&nbsp;sharing<br>
     60 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;same&nbsp;global&nbsp;dump&nbsp;id.<br>
     61 &nbsp;<br>
     62 Attributes:<br>
     63 &nbsp;&nbsp;dump_id:&nbsp;A&nbsp;string&nbsp;identifying&nbsp;this&nbsp;dump.<br>
     64 &nbsp;&nbsp;has_mmaps:&nbsp;True&nbsp;if&nbsp;the&nbsp;memory&nbsp;dump&nbsp;has&nbsp;mmaps&nbsp;information.&nbsp;If&nbsp;False&nbsp;then<br>
     65 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetMemoryUsage&nbsp;will&nbsp;report&nbsp;all&nbsp;zeros.<br>&nbsp;</tt></td></tr>
     66 <tr><td>&nbsp;</td>
     67 <td width="100%">Methods defined here:<br>
     68 <dl><dt><a name="GlobalMemoryDump-GetMemoryUsage"><strong>GetMemoryUsage</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;aggregated&nbsp;memory&nbsp;usage&nbsp;over&nbsp;all&nbsp;processes&nbsp;in&nbsp;this&nbsp;dump.</tt></dd></dl>
     69 
     70 <dl><dt><a name="GlobalMemoryDump-IterProcessMemoryDumps"><strong>IterProcessMemoryDumps</strong></a>(self)</dt></dl>
     71 
     72 <dl><dt><a name="GlobalMemoryDump-__init__"><strong>__init__</strong></a>(self, process_dumps)</dt></dl>
     73 
     74 <dl><dt><a name="GlobalMemoryDump-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
     75 
     76 <hr>
     77 Data descriptors defined here:<br>
     78 <dl><dt><strong>__dict__</strong></dt>
     79 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
     80 </dl>
     81 <dl><dt><strong>__weakref__</strong></dt>
     82 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
     83 </dl>
     84 <dl><dt><strong>duration</strong></dt>
     85 </dl>
     86 <dl><dt><strong>end</strong></dt>
     87 </dl>
     88 <dl><dt><strong>start</strong></dt>
     89 </dl>
     90 </td></tr></table> <p>
     91 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     92 <tr bgcolor="#ffc8d8">
     93 <td colspan=3 valign=bottom>&nbsp;<br>
     94 <font color="#000000" face="helvetica, arial"><a name="MemoryBucket">class <strong>MemoryBucket</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
     95     
     96 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
     97 <td colspan=2><tt>Simple&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;hold&nbsp;and&nbsp;aggregate&nbsp;memory&nbsp;values.<br>&nbsp;</tt></td></tr>
     98 <tr><td>&nbsp;</td>
     99 <td width="100%">Methods defined here:<br>
    100 <dl><dt><a name="MemoryBucket-AddRegion"><strong>AddRegion</strong></a>(self, byte_stats)</dt></dl>
    101 
    102 <dl><dt><a name="MemoryBucket-GetValue"><strong>GetValue</strong></a>(self, name)</dt></dl>
    103 
    104 <dl><dt><a name="MemoryBucket-__init__"><strong>__init__</strong></a>(self)</dt></dl>
    105 
    106 <dl><dt><a name="MemoryBucket-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
    107 
    108 <hr>
    109 Data descriptors defined here:<br>
    110 <dl><dt><strong>__dict__</strong></dt>
    111 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    112 </dl>
    113 <dl><dt><strong>__weakref__</strong></dt>
    114 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    115 </dl>
    116 </td></tr></table> <p>
    117 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
    118 <tr bgcolor="#ffc8d8">
    119 <td colspan=3 valign=bottom>&nbsp;<br>
    120 <font color="#000000" face="helvetica, arial"><a name="MmapCategory">class <strong>MmapCategory</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    121     
    122 <tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
    123 <td width="100%">Methods defined here:<br>
    124 <dl><dt><a name="MmapCategory-GetMatchingChild"><strong>GetMatchingChild</strong></a>(self, mapped_file)</dt><dd><tt>Get&nbsp;the&nbsp;first&nbsp;matching&nbsp;sub-category&nbsp;for&nbsp;a&nbsp;given&nbsp;mapped&nbsp;file.<br>
    125 &nbsp;<br>
    126 Returns&nbsp;None&nbsp;if&nbsp;the&nbsp;category&nbsp;has&nbsp;no&nbsp;children,&nbsp;or&nbsp;the&nbsp;DefaultCategory&nbsp;if<br>
    127 it&nbsp;does&nbsp;have&nbsp;children&nbsp;but&nbsp;none&nbsp;of&nbsp;them&nbsp;match.</tt></dd></dl>
    128 
    129 <dl><dt><a name="MmapCategory-Match"><strong>Match</strong></a>(self, mapped_file)</dt><dd><tt>Test&nbsp;whether&nbsp;a&nbsp;mapped&nbsp;file&nbsp;matches&nbsp;this&nbsp;category.</tt></dd></dl>
    130 
    131 <dl><dt><a name="MmapCategory-__init__"><strong>__init__</strong></a>(self, name, file_pattern, children<font color="#909090">=None</font>)</dt><dd><tt>A&nbsp;(sub)category&nbsp;for&nbsp;classifying&nbsp;memory&nbsp;maps.<br>
    132 &nbsp;<br>
    133 Args:<br>
    134 &nbsp;&nbsp;name:&nbsp;A&nbsp;string&nbsp;to&nbsp;identify&nbsp;the&nbsp;category.<br>
    135 &nbsp;&nbsp;file_pattern:&nbsp;A&nbsp;regex&nbsp;pattern,&nbsp;the&nbsp;category&nbsp;will&nbsp;aggregate&nbsp;memory&nbsp;usage<br>
    136 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;all&nbsp;mapped&nbsp;files&nbsp;matching&nbsp;this&nbsp;pattern.<br>
    137 &nbsp;&nbsp;children:&nbsp;A&nbsp;list&nbsp;of&nbsp;<a href="#MmapCategory">MmapCategory</a>&nbsp;objects,&nbsp;used&nbsp;to&nbsp;sub-categorize&nbsp;memory<br>
    138 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;usage.</tt></dd></dl>
    139 
    140 <hr>
    141 Class methods defined here:<br>
    142 <dl><dt><a name="MmapCategory-DefaultCategory"><strong>DefaultCategory</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>An&nbsp;implicit&nbsp;'Others'&nbsp;match-all&nbsp;category&nbsp;with&nbsp;no&nbsp;children.</tt></dd></dl>
    143 
    144 <hr>
    145 Data descriptors defined here:<br>
    146 <dl><dt><strong>__dict__</strong></dt>
    147 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    148 </dl>
    149 <dl><dt><strong>__weakref__</strong></dt>
    150 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    151 </dl>
    152 </td></tr></table> <p>
    153 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
    154 <tr bgcolor="#ffc8d8">
    155 <td colspan=3 valign=bottom>&nbsp;<br>
    156 <font color="#000000" face="helvetica, arial"><a name="ProcessMemoryDumpEvent">class <strong>ProcessMemoryDumpEvent</strong></a>(<a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a>)</font></td></tr>
    157     
    158 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
    159 <td colspan=2><tt>A&nbsp;memory&nbsp;dump&nbsp;event&nbsp;belonging&nbsp;to&nbsp;a&nbsp;single&nbsp;timeline.Process&nbsp;<a href="__builtin__.html#object">object</a>.<br>
    160 &nbsp;<br>
    161 It's&nbsp;a&nbsp;subclass&nbsp;of&nbsp;telemetry's&nbsp;<a href="telemetry.timeline.event.html#TimelineEvent">TimelineEvent</a>&nbsp;so&nbsp;it&nbsp;can&nbsp;be&nbsp;included&nbsp;in<br>
    162 the&nbsp;stream&nbsp;of&nbsp;events&nbsp;contained&nbsp;in&nbsp;timeline.model&nbsp;objects,&nbsp;and&nbsp;have&nbsp;its<br>
    163 timing&nbsp;correlated&nbsp;with&nbsp;that&nbsp;of&nbsp;other&nbsp;events&nbsp;in&nbsp;the&nbsp;model.<br>
    164 &nbsp;<br>
    165 Properties:<br>
    166 &nbsp;&nbsp;dump_id:&nbsp;A&nbsp;string&nbsp;to&nbsp;identify&nbsp;events&nbsp;belonging&nbsp;to&nbsp;the&nbsp;same&nbsp;global&nbsp;dump.<br>
    167 &nbsp;&nbsp;process:&nbsp;The&nbsp;timeline.Process&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;that&nbsp;owns&nbsp;this&nbsp;memory&nbsp;dump&nbsp;event.<br>
    168 &nbsp;&nbsp;has_mmaps:&nbsp;True&nbsp;if&nbsp;the&nbsp;memory&nbsp;dump&nbsp;has&nbsp;mmaps&nbsp;information.&nbsp;If&nbsp;False&nbsp;then<br>
    169 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetMemoryUsage&nbsp;will&nbsp;report&nbsp;all&nbsp;zeros.<br>&nbsp;</tt></td></tr>
    170 <tr><td>&nbsp;</td>
    171 <td width="100%"><dl><dt>Method resolution order:</dt>
    172 <dd><a href="telemetry.timeline.memory_dump_event.html#ProcessMemoryDumpEvent">ProcessMemoryDumpEvent</a></dd>
    173 <dd><a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a></dd>
    174 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
    175 </dl>
    176 <hr>
    177 Methods defined here:<br>
    178 <dl><dt><a name="ProcessMemoryDumpEvent-GetMemoryBucket"><strong>GetMemoryBucket</strong></a>(self, path)</dt><dd><tt>Return&nbsp;the&nbsp;<a href="#MemoryBucket">MemoryBucket</a>&nbsp;associated&nbsp;with&nbsp;a&nbsp;category&nbsp;path.<br>
    179 &nbsp;<br>
    180 An&nbsp;empty&nbsp;bucket&nbsp;will&nbsp;be&nbsp;created&nbsp;if&nbsp;the&nbsp;path&nbsp;does&nbsp;not&nbsp;already&nbsp;exist.<br>
    181 &nbsp;<br>
    182 path:&nbsp;A&nbsp;string&nbsp;with&nbsp;path&nbsp;in&nbsp;the&nbsp;classification&nbsp;tree,&nbsp;e.g.<br>
    183 &nbsp;&nbsp;&nbsp;&nbsp;'/Android/Java&nbsp;runtime/Cache'.&nbsp;Note:&nbsp;no&nbsp;trailing&nbsp;slash,&nbsp;except&nbsp;for<br>
    184 &nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;root&nbsp;path&nbsp;'/'.</tt></dd></dl>
    185 
    186 <dl><dt><a name="ProcessMemoryDumpEvent-GetMemoryUsage"><strong>GetMemoryUsage</strong></a>(self)</dt><dd><tt>Get&nbsp;a&nbsp;dictionary&nbsp;with&nbsp;the&nbsp;memory&nbsp;usage&nbsp;of&nbsp;this&nbsp;process.</tt></dd></dl>
    187 
    188 <dl><dt><a name="ProcessMemoryDumpEvent-GetMemoryValue"><strong>GetMemoryValue</strong></a>(self, category_path, discount_tracing<font color="#909090">=False</font>)</dt><dd><tt>Return&nbsp;a&nbsp;specific&nbsp;value&nbsp;from&nbsp;within&nbsp;a&nbsp;<a href="#MemoryBucket">MemoryBucket</a>.<br>
    189 &nbsp;<br>
    190 category_path:&nbsp;A&nbsp;string&nbsp;composed&nbsp;of&nbsp;a&nbsp;path&nbsp;in&nbsp;the&nbsp;classification&nbsp;tree,<br>
    191 &nbsp;&nbsp;&nbsp;&nbsp;followed&nbsp;by&nbsp;a&nbsp;'.',&nbsp;followed&nbsp;by&nbsp;a&nbsp;specific&nbsp;bucket&nbsp;value,&nbsp;e.g.<br>
    192 &nbsp;&nbsp;&nbsp;&nbsp;'/Android/Java&nbsp;runtime/Cache.private_dirty_resident'.<br>
    193 discount_tracing:&nbsp;A&nbsp;boolean&nbsp;indicating&nbsp;whether&nbsp;the&nbsp;returned&nbsp;value&nbsp;should<br>
    194 &nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;discounted&nbsp;by&nbsp;the&nbsp;resident&nbsp;size&nbsp;of&nbsp;the&nbsp;tracing&nbsp;allocator.</tt></dd></dl>
    195 
    196 <dl><dt><a name="ProcessMemoryDumpEvent-__init__"><strong>__init__</strong></a>(self, process, event)</dt></dl>
    197 
    198 <dl><dt><a name="ProcessMemoryDumpEvent-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
    199 
    200 <hr>
    201 Data descriptors defined here:<br>
    202 <dl><dt><strong>process_name</strong></dt>
    203 </dl>
    204 <hr>
    205 Data descriptors inherited from <a href="telemetry.timeline.event.html#TimelineEvent">telemetry.timeline.event.TimelineEvent</a>:<br>
    206 <dl><dt><strong>__dict__</strong></dt>
    207 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    208 </dl>
    209 <dl><dt><strong>__weakref__</strong></dt>
    210 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    211 </dl>
    212 <dl><dt><strong>end</strong></dt>
    213 </dl>
    214 <dl><dt><strong>has_thread_timestamps</strong></dt>
    215 </dl>
    216 <dl><dt><strong>thread_end</strong></dt>
    217 <dd><tt>Thread-specific&nbsp;CPU&nbsp;time&nbsp;when&nbsp;this&nbsp;event&nbsp;ended.<br>
    218 &nbsp;<br>
    219 May&nbsp;be&nbsp;None&nbsp;if&nbsp;the&nbsp;trace&nbsp;event&nbsp;didn't&nbsp;have&nbsp;thread&nbsp;time&nbsp;data.</tt></dd>
    220 </dl>
    221 </td></tr></table></td></tr></table><p>
    222 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
    223 <tr bgcolor="#55aa55">
    224 <td colspan=3 valign=bottom>&nbsp;<br>
    225 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    226     
    227 <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
    228 <td width="100%"><strong>BUCKET_ATTRS</strong> = {'private_clean_resident': 'pc', 'private_dirty_resident': 'pd', 'proportional_resident': 'pss', 'shared_clean_resident': 'sc', 'shared_dirty_resident': 'sd', 'swapped': 'sw'}<br>
    229 <strong>MMAPS_METRICS</strong> = {'mmaps_ashmem': ('/Android/Ashmem.proportional_resident', False), 'mmaps_java_heap': ('/Android/Java runtime/Spaces.proportional_resident', False), 'mmaps_native_heap': ('/Native heap.proportional_resident', True), 'mmaps_overall_pss': ('/.proportional_resident', True), 'mmaps_private_dirty': ('/.private_dirty_resident', True)}<br>
    230 <strong>ROOT_CATEGORY</strong> = &lt;telemetry.timeline.memory_dump_event.MmapCategory object&gt;</td></tr></table>
    231 </body></html>