[f1607a4] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY valgrind-download-http "http://valgrind.org/downloads/valgrind-&valgrind-version;.tar.bz2">
|
---|
| 8 | <!ENTITY valgrind-download-ftp " ">
|
---|
[29dbd37] | 9 | <!ENTITY valgrind-md5sum "4ea62074da73ae82e0162d6550d3f129">
|
---|
[528bf1b] | 10 | <!ENTITY valgrind-size "10.5 MB">
|
---|
[29dbd37] | 11 | <!ENTITY valgrind-buildsize "343 MB (additional 228 MB for tests)">
|
---|
| 12 | <!ENTITY valgrind-time "1.2 SBU (additional 5.1 SBU for tests)">
|
---|
[f1607a4] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="valgrind" xreflabel="Valgrind-&valgrind-version;">
|
---|
| 16 | <?dbhtml filename="valgrind.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>Valgrind-&valgrind-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="valgrind">
|
---|
| 26 | <primary sortas="a-Valgrind">Valgrind</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Valgrind</title>
|
---|
| 31 |
|
---|
| 32 | <para>
|
---|
| 33 | <application>Valgrind</application> is an instrumentation framework for
|
---|
| 34 | building dynamic analysis tools. There are Valgrind tools that can
|
---|
| 35 | automatically detect many memory management and threading bugs, and
|
---|
| 36 | profile programs in detail. Valgrind can also be used to build new
|
---|
[f3429309] | 37 | tools.
|
---|
[f1607a4] | 38 | </para>
|
---|
| 39 |
|
---|
[57e8690b] | 40 | &lfs78_checked;
|
---|
[f1607a4] | 41 |
|
---|
| 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>
|
---|
| 46 | Download (HTTP): <ulink url="&valgrind-download-http;"/>
|
---|
| 47 | </para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>
|
---|
| 51 | Download (FTP): <ulink url="&valgrind-download-ftp;"/>
|
---|
| 52 | </para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>
|
---|
| 56 | Download MD5 sum: &valgrind-md5sum;
|
---|
| 57 | </para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>
|
---|
| 61 | Download size: &valgrind-size;
|
---|
| 62 | </para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>
|
---|
| 66 | Estimated disk space required: &valgrind-buildsize;
|
---|
| 67 | </para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>
|
---|
| 71 | Estimated build time: &valgrind-time;
|
---|
| 72 | </para>
|
---|
| 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
| 75 |
|
---|
| 76 | <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
|
---|
| 77 |
|
---|
| 78 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 79 | <para role="optional">
|
---|
| 80 | <xref linkend="boost"/>,
|
---|
[f3429309] | 81 | <xref linkend="llvm"/> (with Clang),
|
---|
[b5102a2d] | 82 | <xref linkend="gdb"/> (for tests), and
|
---|
[e8dafe8a] | 83 | <ulink url="http://www.openmp.org">OpenMP</ulink>
|
---|
[f1607a4] | 84 | </para>
|
---|
| 85 |
|
---|
| 86 | <bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
|
---|
| 87 | <para role="optional">
|
---|
[f3429309] | 88 | <xref linkend="libxslt"/> and
|
---|
[2d98031c] | 89 | <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
|
---|
[f1607a4] | 90 | </para>
|
---|
| 91 |
|
---|
| 92 | <para condition="html" role="usernotes">User Notes:
|
---|
| 93 | <ulink url="&blfs-wiki;/valgrind"/>
|
---|
| 94 | </para>
|
---|
| 95 | </sect2>
|
---|
| 96 |
|
---|
| 97 | <sect2 role="installation">
|
---|
| 98 | <title>Installation of Valgrind</title>
|
---|
| 99 |
|
---|
[bbe0fbf] | 100 | <para>
|
---|
| 101 | Install <application>Valgrind</application> by running the following
|
---|
[1b0d0188] | 102 | commands:
|
---|
| 103 | </para>
|
---|
| 104 |
|
---|
[29dbd37] | 105 | <screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &&
|
---|
[1b0d0188] | 106 |
|
---|
| 107 | ./configure --prefix=/usr \
|
---|
[f1607a4] | 108 | --datadir=/usr/share/doc/valgrind-&valgrind-version; &&
|
---|
| 109 | make</userinput></screen>
|
---|
| 110 |
|
---|
| 111 | <para>
|
---|
[bbe0fbf] | 112 | To test the results, issue: <command>make regtest</command>. The tests
|
---|
| 113 | may hang forever if <xref linkend="gdb"/> is not installed.
|
---|
[f1607a4] | 114 | </para>
|
---|
[efe8031e] | 115 | <!-- Note to maintainer: Recheck when next texlive (2015) is released.
|
---|
[f1607a4] | 116 | <para>
|
---|
| 117 | If you wish to regenerate the documentation, run:
|
---|
| 118 | </para>
|
---|
| 119 |
|
---|
[bbe0fbf] | 120 | <screen><userinput>make -C docs download-docs</userinput></screen>
|
---|
[efe8031e] | 121 | -->
|
---|
[f1607a4] | 122 | <para>
|
---|
| 123 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 124 | </para>
|
---|
| 125 |
|
---|
| 126 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 127 |
|
---|
| 128 | </sect2>
|
---|
| 129 |
|
---|
| 130 | <sect2 role="commands">
|
---|
| 131 | <title>Command Explanations</title>
|
---|
| 132 |
|
---|
| 133 | <para>
|
---|
[9dfdd942] | 134 | <command>sed -i ... docs/Makefile.in </command>: This sed provides for
|
---|
[f1607a4] | 135 | installing the documentation in a versioned directory.
|
---|
| 136 | </para>
|
---|
| 137 |
|
---|
| 138 | </sect2>
|
---|
| 139 |
|
---|
| 140 | <sect2 role="content">
|
---|
| 141 | <title>Contents</title>
|
---|
| 142 |
|
---|
| 143 | <segmentedlist>
|
---|
| 144 | <segtitle>Installed Programs</segtitle>
|
---|
| 145 | <segtitle>Installed Library</segtitle>
|
---|
| 146 | <segtitle>Installed Directories</segtitle>
|
---|
| 147 |
|
---|
| 148 | <seglistitem>
|
---|
| 149 | <seg>
|
---|
[f3429309] | 150 | callgrind_annotate,
|
---|
| 151 | callgrind_control,
|
---|
| 152 | cg_annotate,
|
---|
| 153 | cg_diff,
|
---|
| 154 | cg_merge,
|
---|
| 155 | ms_print,
|
---|
| 156 | valgrind,
|
---|
[f1607a4] | 157 | valgrind-di-server,
|
---|
[f3429309] | 158 | valgrind-listener, and
|
---|
[f1607a4] | 159 | vgdb
|
---|
| 160 | </seg>
|
---|
| 161 | <seg>
|
---|
[528bf1b] | 162 | libcoregrind-<Arch>-linux.a,
|
---|
| 163 | libreplacemalloc_toolpreload-<Arch>-linux.a,
|
---|
| 164 | libvex-<Arch>-linux.a,
|
---|
[29dbd37] | 165 | libvexmultiarch-amd64-linux.a,
|
---|
[528bf1b] | 166 | vgpreload_core-<Arch>-linux.so,
|
---|
| 167 | vgpreload_drd-<Arch>-linux.so,
|
---|
| 168 | vgpreload_exp-dhat-<Arch>-linux.so,
|
---|
| 169 | vgpreload_exp-sgcheck-<Arch>-linux.so,
|
---|
| 170 | vgpreload_helgrind-<Arch>-linux.so,
|
---|
| 171 | vgpreload_massif-<Arch>-linux.so, and
|
---|
| 172 | vgpreload_memcheck-<Arch>-linux.so, where
|
---|
[29dbd37] | 173 | <Arch> is x86 or amd64
|
---|
[f1607a4] | 174 | </seg>
|
---|
| 175 | <seg>
|
---|
| 176 | /usr/lib/valgrind,
|
---|
[f3429309] | 177 | /usr/include/valgrind, and
|
---|
[f1607a4] | 178 | /usr/share/doc/valgrind-&valgrind-version;
|
---|
| 179 | </seg>
|
---|
| 180 | </seglistitem>
|
---|
| 181 | </segmentedlist>
|
---|
| 182 |
|
---|
| 183 | <variablelist>
|
---|
| 184 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 185 | <?dbfo list-presentation="list"?>
|
---|
| 186 | <?dbhtml list-presentation="table"?>
|
---|
| 187 |
|
---|
| 188 | <varlistentry id="valgrind-prog">
|
---|
| 189 | <term><command>valgrind</command></term>
|
---|
| 190 | <listitem>
|
---|
| 191 | <para>
|
---|
| 192 | is a program for debugging and profiling Linux executables.
|
---|
| 193 | </para>
|
---|
| 194 | <indexterm zone="valgrind valgrind-prog">
|
---|
| 195 | <primary sortas="b-valgrind">valgrind</primary>
|
---|
| 196 | </indexterm>
|
---|
| 197 | </listitem>
|
---|
| 198 | </varlistentry>
|
---|
| 199 |
|
---|
| 200 | <varlistentry id="callgrind_annotate">
|
---|
| 201 | <term><command>callgrind_annotate</command></term>
|
---|
| 202 | <listitem>
|
---|
| 203 | <para>
|
---|
| 204 | takes an output file produced by the
|
---|
| 205 | <application>Valgrind</application> tool Callgrind and prints the
|
---|
| 206 | information in an easy-to-read form.
|
---|
| 207 | </para>
|
---|
| 208 | <indexterm zone="callgrind_annotate">
|
---|
| 209 | <primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
|
---|
| 210 | </indexterm>
|
---|
| 211 | </listitem>
|
---|
| 212 | </varlistentry>
|
---|
| 213 |
|
---|
| 214 | <varlistentry id="callgrind_control">
|
---|
| 215 | <term><command>callgrind_control</command></term>
|
---|
| 216 | <listitem>
|
---|
| 217 | <para>
|
---|
[f3429309] | 218 | controls programs being run by the <application>Valgrind</application>
|
---|
[f1607a4] | 219 | tool Callgrind.
|
---|
| 220 | </para>
|
---|
| 221 | <indexterm zone="valgrind callgrind_control">
|
---|
| 222 | <primary sortas="b-callgrind_control">callgrind_control</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
| 227 | <varlistentry id="cg_annotate">
|
---|
| 228 | <term><command>cg_annotate</command></term>
|
---|
| 229 | <listitem>
|
---|
| 230 | <para>
|
---|
[f3429309] | 231 | is a post-processing tool for the <application>Valgrind</application>
|
---|
[f1607a4] | 232 | tool Cachegrind.
|
---|
| 233 | </para>
|
---|
| 234 | <indexterm zone="valgrind cg_annotate">
|
---|
| 235 | <primary sortas="b-cg_annotate">cg_annotate</primary>
|
---|
| 236 | </indexterm>
|
---|
| 237 | </listitem>
|
---|
| 238 | </varlistentry>
|
---|
| 239 |
|
---|
| 240 | <varlistentry id="cg_diff">
|
---|
| 241 | <term><command>cg_diff</command></term>
|
---|
| 242 | <listitem>
|
---|
| 243 | <para>
|
---|
| 244 | compares two Cachegrind output files.
|
---|
| 245 | </para>
|
---|
| 246 | <indexterm zone="valgrind cg_diff">
|
---|
| 247 | <primary sortas="b-cg_diff">cg_diff</primary>
|
---|
| 248 | </indexterm>
|
---|
| 249 | </listitem>
|
---|
| 250 | </varlistentry>
|
---|
| 251 |
|
---|
| 252 | <varlistentry id="cg_merge">
|
---|
| 253 | <term><command>cg_merge</command></term>
|
---|
| 254 | <listitem>
|
---|
| 255 | <para>
|
---|
| 256 | merges multiple Cachegrind output files into one.
|
---|
| 257 | </para>
|
---|
| 258 | <indexterm zone="valgrind cg_merge">
|
---|
| 259 | <primary sortas="b-cg_merge">cg_merge</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
| 262 | </varlistentry>
|
---|
| 263 |
|
---|
| 264 | <varlistentry id="ms_print">
|
---|
| 265 | <term><command>ms_print</command></term>
|
---|
| 266 | <listitem>
|
---|
| 267 | <para>
|
---|
| 268 | takes an output file produced by the <application>Valgrind</application>
|
---|
| 269 | tool Massif and prints the information in an easy-to-read form.
|
---|
| 270 | </para>
|
---|
| 271 | <indexterm zone="valgrind ms_print">
|
---|
| 272 | <primary sortas="b-ms_print">ms_print</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
| 277 | <varlistentry id="valgrind-di-server">
|
---|
| 278 | <term><command>valgrind-di-server</command></term>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para>
|
---|
[f3429309] | 281 | is a server that reads debuginfo from objects stored on a
|
---|
[f1607a4] | 282 | different machine.
|
---|
| 283 | </para>
|
---|
| 284 | <indexterm zone="valgrind valgrind-di-server">
|
---|
| 285 | <primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 | </listitem>
|
---|
| 288 | </varlistentry>
|
---|
| 289 |
|
---|
| 290 | <varlistentry id="valgrind-listener">
|
---|
| 291 | <term><command>valgrind-listener</command></term>
|
---|
| 292 | <listitem>
|
---|
| 293 | <para>
|
---|
| 294 | listens on a socket for Valgrind commentary.
|
---|
| 295 | </para>
|
---|
| 296 | <indexterm zone="valgrind valgrind-listener">
|
---|
| 297 | <primary sortas="b-valgrind-listener">valgrind-listener</primary>
|
---|
| 298 | </indexterm>
|
---|
| 299 | </listitem>
|
---|
| 300 | </varlistentry>
|
---|
| 301 |
|
---|
| 302 | <varlistentry id="vgdb">
|
---|
| 303 | <term><command>vgdb</command></term>
|
---|
| 304 | <listitem>
|
---|
| 305 | <para>
|
---|
| 306 | is an intermediary between Valgrind and GDB or a shell.
|
---|
| 307 | </para>
|
---|
| 308 | <indexterm zone="valgrind vgdb">
|
---|
| 309 | <primary sortas="b-vgdb">vgdb</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
| 314 | </variablelist>
|
---|
| 315 |
|
---|
| 316 | </sect2>
|
---|
| 317 |
|
---|
| 318 | </sect1>
|
---|