UPDATE : valgrind version update and add files for SDK package
[sdk/tools/upstream/valgrind.git] / docs / html / ms-manual.html
index 9033d50..f7fe562 100644 (file)
@@ -2,8 +2,8 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>9. Massif: a heap profiler</title>
-<link rel="stylesheet" href="vg_basic.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="vg_basic.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
 <link rel="home" href="index.html" title="Valgrind Documentation">
 <link rel="up" href="manual.html" title="Valgrind User Manual">
 <link rel="prev" href="drd-manual.html" title="8. DRD: a thread error detector">
 <th align="center" valign="middle">Valgrind User Manual</th>
 <td width="22px" align="center" valign="middle"><a accesskey="n" href="dh-manual.html"><img src="images/next.png" width="18" height="21" border="0" alt="Next"></a></td>
 </tr></table></div>
-<div class="chapter" title="9. Massif: a heap profiler">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="ms-manual"></a>9. Massif: a heap profiler</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="ms-manual"></a>9. Massif: a heap profiler</h1></div></div></div>
 <div class="toc">
 <p><b>Table of Contents</b></p>
-<dl>
+<dl class="toc">
 <dt><span class="sect1"><a href="ms-manual.html#ms-manual.overview">9.1. Overview</a></span></dt>
 <dt><span class="sect1"><a href="ms-manual.html#ms-manual.using">9.2. Using Massif and ms_print</a></span></dt>
 <dd><dl>
@@ -46,7 +46,7 @@
 <p>To use this tool, you must specify
 <code class="option">--tool=massif</code> on the Valgrind
 command line.</p>
-<div class="sect1" title="9.1. Overview">
+<div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="ms-manual.overview"></a>9.1. Overview</h2></div></div></div>
 <p>Massif is a heap profiler.  It measures how much heap memory your
@@ -57,7 +57,7 @@ default.</p>
 <p>Heap profiling can help you reduce the amount of memory your program
 uses.  On modern machines with virtual memory, this provides the following
 benefits:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem"><p>It can speed up your program -- a smaller
     program will interact better with your machine's caches and
     avoid paging.</p></li>
@@ -76,7 +76,7 @@ program is using, it also gives very detailed information that indicates
 which parts of your program are responsible for allocating the heap memory.
 </p>
 </div>
-<div class="sect1" title="9.2. Using Massif and ms_print">
+<div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="ms-manual.using"></a>9.2. Using Massif and ms_print</h2></div></div></div>
 <p>First off, as for the other Valgrind tools, you should compile with
@@ -85,7 +85,7 @@ matter much what optimisation level you compile your program with, as this
 is unlikely to affect the heap memory usage.</p>
 <p>Then, you need to run Massif itself to gather the profiling
 information, and then run ms_print to present it in a readable way.</p>
-<div class="sect2" title="9.2.1. An Example Program">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.anexample"></a>9.2.1. An Example Program</h3></div></div></div>
 <p>An example will make things clear.  Consider the following C program
@@ -126,7 +126,7 @@ on the heap.</p>
 32      }
 </pre>
 </div>
-<div class="sect2" title="9.2.2. Running Massif">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.running-massif"></a>9.2.2. Running Massif</h3></div></div></div>
 <p>To gather heap profiling information about the program
@@ -141,7 +141,7 @@ data is written to a file.  By default, this file is called
 <code class="filename">&lt;pid&gt;</code> is the process ID, although this filename
 can be changed with the <code class="option">--massif-out-file</code> option.</p>
 </div>
-<div class="sect2" title="9.2.3. Running ms_print">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.running-ms_print"></a>9.2.3. Running ms_print</h3></div></div></div>
 <p>To see the information gathered by Massif in an easy-to-read form, use
@@ -157,7 +157,7 @@ results is deliberate:  it separates the data gathering from its
 presentation, and means that new methods of presenting the data can be added in
 the future.</p>
 </div>
-<div class="sect2" title="9.2.4. The Output Preamble">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.theoutputpreamble"></a>9.2.4. The Output Preamble</h3></div></div></div>
 <p>After running this program under Massif, the first part of ms_print's
@@ -171,7 +171,7 @@ ms_print arguments: massif.out.12797
 --------------------------------------------------------------------------------
 </pre>
 </div>
-<div class="sect2" title="9.2.5. The Output Graph">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.theoutputgraph"></a>9.2.5. The Output Graph</h3></div></div></div>
 <p>The next part is the graph that shows how memory consumption occurred
@@ -273,7 +273,7 @@ a bar consisting of '#' characters.  The text at the bottom shows
 that snapshot 14 was the peak.</p>
 <p>Massif's determination of when the peak occurred can be wrong, for
 two reasons.</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem"><p>Peak snapshots are only ever taken after a deallocation
   happens.  This avoids lots of unnecessary peak snapshot recordings
   (imagine what happens if your program allocates a lot of heap blocks in
@@ -324,7 +324,7 @@ for memory measurements, these are based on a multiplier of 1024, rather
 than the standard SI multiplier of 1000.  Strictly speaking, they should be
 written KiB, MiB, GiB, etc.</p>
 </div>
-<div class="sect2" title="9.2.6. The Snapshot Details">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.thesnapshotdetails"></a>9.2.6. The Snapshot Details</h3></div></div></div>
 <p>Returning to our example, the graph is followed by the detailed
@@ -345,7 +345,7 @@ a small amount of information is recorded for each one:</p>
   8          8,064            8,064            8,000            64            0
 </pre>
 <p>Each normal snapshot records several things.</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem"><p>Its number.</p></li>
 <li class="listitem"><p>The time it was taken. In this case, the time unit is
   bytes, due to the use of
@@ -495,7 +495,7 @@ thresholds can be changed with the
 <code class="option">--threshold</code> option that both Massif and
 ms_print support.</p>
 </div>
-<div class="sect2" title="9.2.7. Forking Programs">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.forkingprograms"></a>9.2.7. Forking Programs</h3></div></div></div>
 <p>If your program forks, the child will inherit all the profiling data that
@@ -505,7 +505,7 @@ has been gathered for the parent.</p>
 the outputs from the parent and child will be intermingled in a single output
 file, which will almost certainly make it unreadable by ms_print.</p>
 </div>
-<div class="sect2" title="9.2.8. Measuring All Memory in a Process">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.not-measured"></a>9.2.8. Measuring All Memory in a Process</h3></div></div></div>
 <p>
@@ -573,7 +573,7 @@ like the memory allocators.  But for some programs having the full information
 about memory usage can be very useful.
 </p>
 </div>
-<div class="sect2" title="9.2.9. Acting on Massif's Information">
+<div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="ms-manual.acting"></a>9.2.9. Acting on Massif's Information</h3></div></div></div>
 <p>Massif's information is generally fairly easy to act upon.  The
@@ -588,12 +588,12 @@ in a particular column, which makes following the allocation chains easier.
 </p>
 </div>
 </div>
-<div class="sect1" title="9.3. Massif Command-line Options">
+<div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="ms-manual.options"></a>9.3. Massif Command-line Options</h2></div></div></div>
 <p>Massif-specific command-line options are:</p>
 <div class="variablelist">
-<a name="ms.opts.list"></a><dl>
+<a name="ms.opts.list"></a><dl class="variablelist">
 <dt>
 <a name="opt.heap"></a><span class="term">
       <code class="option">--heap=&lt;yes|no&gt; [default: yes] </code>
@@ -764,13 +764,13 @@ in a particular column, which makes following the allocation chains easier.
 </dl>
 </div>
 </div>
-<div class="sect1" title="9.4. Massif Monitor Commands">
+<div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="ms-manual.monitor-commands"></a>9.4. Massif Monitor Commands</h2></div></div></div>
 <p>The Massif tool provides monitor commands handled by the Valgrind
 gdbserver (see <a class="xref" href="manual-core-adv.html#manual-core-adv.gdbserver-commandhandling" title="3.2.5. Monitor command handling by the Valgrind gdbserver">Monitor command handling by the Valgrind gdbserver</a>).
 </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem"><p><code class="varname">snapshot [&lt;filename&gt;]</code> requests
     to take a snapshot and save it in the given &lt;filename&gt;
     (default massif.vgdb.out).
@@ -781,7 +781,7 @@ gdbserver (see <a class="xref" href="manual-core-adv.html#manual-core-adv.gdbser
     </p></li>
 </ul></div>
 </div>
-<div class="sect1" title="9.5. Massif Client Requests">
+<div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="ms-manual.clientreqs"></a>9.5. Massif Client Requests</h2></div></div></div>
 <p>Massif does not have a <code class="filename">massif.h</code> file, but it does
@@ -791,12 +791,12 @@ implement two of the core client requests:
 <a class="xref" href="manual-core-adv.html#manual-core-adv.clientreq" title="3.1. The Client Request mechanism">The Client Request mechanism</a>.
 </p>
 </div>
-<div class="sect1" title="9.6. ms_print Command-line Options">
+<div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="ms-manual.ms_print-options"></a>9.6. ms_print Command-line Options</h2></div></div></div>
 <p>ms_print's options are:</p>
 <div class="variablelist">
-<a name="ms_print.opts.list"></a><dl>
+<a name="ms_print.opts.list"></a><dl class="variablelist">
 <dt><span class="term">
       <code class="option">-h --help </code>
     </span></dt>
@@ -821,7 +821,7 @@ implement two of the core client requests:
 </dl>
 </div>
 </div>
-<div class="sect1" title="9.7. Massif's Output File Format">
+<div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="ms-manual.fileformat"></a>9.7. Massif's Output File Format</h2></div></div></div>
 <p>Massif's file format is plain text (i.e. not binary) and deliberately