[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 |
|
---|
[ac55e029] | 40 | &lfs7a_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 |
|
---|
[55e8f78] | 76 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 77 | <itemizedlist spacing="compact">
|
---|
| 78 | <listitem>
|
---|
| 79 | <para>
|
---|
| 80 | Required patch:
|
---|
| 81 | <ulink url="&patch-root;/valgrind-&valgrind-version;-upstream_fixes-1.patch"/>
|
---|
| 82 | </para>
|
---|
| 83 | </listitem>
|
---|
| 84 | </itemizedlist>
|
---|
| 85 |
|
---|
[f1607a4] | 86 | <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
|
---|
| 87 |
|
---|
| 88 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 89 | <para role="optional">
|
---|
| 90 | <xref linkend="boost"/>,
|
---|
[f3429309] | 91 | <xref linkend="llvm"/> (with Clang),
|
---|
[35f1730] | 92 | <xref linkend="gdb"/> (for tests),
|
---|
| 93 | <xref linkend="which"/> (for tests),
|
---|
| 94 | <xref linkend="bind"/> or <xref linkend="bind-utils"/> (for tests),
|
---|
| 95 | and
|
---|
[e8dafe8a] | 96 | <ulink url="http://www.openmp.org">OpenMP</ulink>
|
---|
[f1607a4] | 97 | </para>
|
---|
| 98 |
|
---|
| 99 | <bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
|
---|
| 100 | <para role="optional">
|
---|
[f3429309] | 101 | <xref linkend="libxslt"/> and
|
---|
[2d98031c] | 102 | <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
|
---|
[f1607a4] | 103 | </para>
|
---|
| 104 |
|
---|
| 105 | <para condition="html" role="usernotes">User Notes:
|
---|
| 106 | <ulink url="&blfs-wiki;/valgrind"/>
|
---|
| 107 | </para>
|
---|
| 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <sect2 role="installation">
|
---|
| 111 | <title>Installation of Valgrind</title>
|
---|
| 112 |
|
---|
[55e8f78] | 113 | <para>
|
---|
| 114 | First, apply a patch that fixes problems with the test suite as well
|
---|
| 115 | as with file closing.
|
---|
| 116 | </para>
|
---|
| 117 |
|
---|
| 118 | <screen><userinput>patch -Np1 -i ../valgrind-3.11.0-upstream_fixes-1.patch</userinput></screen>
|
---|
| 119 |
|
---|
[bbe0fbf] | 120 | <para>
|
---|
| 121 | Install <application>Valgrind</application> by running the following
|
---|
[1b0d0188] | 122 | commands:
|
---|
| 123 | </para>
|
---|
| 124 |
|
---|
[29dbd37] | 125 | <screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &&
|
---|
[1b0d0188] | 126 |
|
---|
| 127 | ./configure --prefix=/usr \
|
---|
[f1607a4] | 128 | --datadir=/usr/share/doc/valgrind-&valgrind-version; &&
|
---|
| 129 | make</userinput></screen>
|
---|
| 130 |
|
---|
| 131 | <para>
|
---|
[bbe0fbf] | 132 | To test the results, issue: <command>make regtest</command>. The tests
|
---|
| 133 | may hang forever if <xref linkend="gdb"/> is not installed.
|
---|
[f1607a4] | 134 | </para>
|
---|
[efe8031e] | 135 | <!-- Note to maintainer: Recheck when next texlive (2015) is released.
|
---|
[f1607a4] | 136 | <para>
|
---|
| 137 | If you wish to regenerate the documentation, run:
|
---|
| 138 | </para>
|
---|
| 139 |
|
---|
[bbe0fbf] | 140 | <screen><userinput>make -C docs download-docs</userinput></screen>
|
---|
[efe8031e] | 141 | -->
|
---|
[f1607a4] | 142 | <para>
|
---|
| 143 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 144 | </para>
|
---|
| 145 |
|
---|
| 146 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 147 |
|
---|
| 148 | </sect2>
|
---|
| 149 |
|
---|
| 150 | <sect2 role="commands">
|
---|
| 151 | <title>Command Explanations</title>
|
---|
| 152 |
|
---|
| 153 | <para>
|
---|
[9dfdd942] | 154 | <command>sed -i ... docs/Makefile.in </command>: This sed provides for
|
---|
[f1607a4] | 155 | installing the documentation in a versioned directory.
|
---|
| 156 | </para>
|
---|
| 157 |
|
---|
| 158 | </sect2>
|
---|
| 159 |
|
---|
| 160 | <sect2 role="content">
|
---|
| 161 | <title>Contents</title>
|
---|
| 162 |
|
---|
| 163 | <segmentedlist>
|
---|
| 164 | <segtitle>Installed Programs</segtitle>
|
---|
| 165 | <segtitle>Installed Library</segtitle>
|
---|
| 166 | <segtitle>Installed Directories</segtitle>
|
---|
| 167 |
|
---|
| 168 | <seglistitem>
|
---|
| 169 | <seg>
|
---|
[f3429309] | 170 | callgrind_annotate,
|
---|
| 171 | callgrind_control,
|
---|
| 172 | cg_annotate,
|
---|
| 173 | cg_diff,
|
---|
| 174 | cg_merge,
|
---|
| 175 | ms_print,
|
---|
| 176 | valgrind,
|
---|
[f1607a4] | 177 | valgrind-di-server,
|
---|
[f3429309] | 178 | valgrind-listener, and
|
---|
[f1607a4] | 179 | vgdb
|
---|
| 180 | </seg>
|
---|
| 181 | <seg>
|
---|
[528bf1b] | 182 | libcoregrind-<Arch>-linux.a,
|
---|
| 183 | libreplacemalloc_toolpreload-<Arch>-linux.a,
|
---|
| 184 | libvex-<Arch>-linux.a,
|
---|
[29dbd37] | 185 | libvexmultiarch-amd64-linux.a,
|
---|
[528bf1b] | 186 | vgpreload_core-<Arch>-linux.so,
|
---|
| 187 | vgpreload_drd-<Arch>-linux.so,
|
---|
| 188 | vgpreload_exp-dhat-<Arch>-linux.so,
|
---|
| 189 | vgpreload_exp-sgcheck-<Arch>-linux.so,
|
---|
| 190 | vgpreload_helgrind-<Arch>-linux.so,
|
---|
| 191 | vgpreload_massif-<Arch>-linux.so, and
|
---|
| 192 | vgpreload_memcheck-<Arch>-linux.so, where
|
---|
[29dbd37] | 193 | <Arch> is x86 or amd64
|
---|
[f1607a4] | 194 | </seg>
|
---|
| 195 | <seg>
|
---|
| 196 | /usr/lib/valgrind,
|
---|
[f3429309] | 197 | /usr/include/valgrind, and
|
---|
[f1607a4] | 198 | /usr/share/doc/valgrind-&valgrind-version;
|
---|
| 199 | </seg>
|
---|
| 200 | </seglistitem>
|
---|
| 201 | </segmentedlist>
|
---|
| 202 |
|
---|
| 203 | <variablelist>
|
---|
| 204 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 205 | <?dbfo list-presentation="list"?>
|
---|
| 206 | <?dbhtml list-presentation="table"?>
|
---|
| 207 |
|
---|
| 208 | <varlistentry id="valgrind-prog">
|
---|
| 209 | <term><command>valgrind</command></term>
|
---|
| 210 | <listitem>
|
---|
| 211 | <para>
|
---|
| 212 | is a program for debugging and profiling Linux executables.
|
---|
| 213 | </para>
|
---|
| 214 | <indexterm zone="valgrind valgrind-prog">
|
---|
| 215 | <primary sortas="b-valgrind">valgrind</primary>
|
---|
| 216 | </indexterm>
|
---|
| 217 | </listitem>
|
---|
| 218 | </varlistentry>
|
---|
| 219 |
|
---|
| 220 | <varlistentry id="callgrind_annotate">
|
---|
| 221 | <term><command>callgrind_annotate</command></term>
|
---|
| 222 | <listitem>
|
---|
| 223 | <para>
|
---|
| 224 | takes an output file produced by the
|
---|
| 225 | <application>Valgrind</application> tool Callgrind and prints the
|
---|
| 226 | information in an easy-to-read form.
|
---|
| 227 | </para>
|
---|
| 228 | <indexterm zone="callgrind_annotate">
|
---|
| 229 | <primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
|
---|
| 230 | </indexterm>
|
---|
| 231 | </listitem>
|
---|
| 232 | </varlistentry>
|
---|
| 233 |
|
---|
| 234 | <varlistentry id="callgrind_control">
|
---|
| 235 | <term><command>callgrind_control</command></term>
|
---|
| 236 | <listitem>
|
---|
| 237 | <para>
|
---|
[f3429309] | 238 | controls programs being run by the <application>Valgrind</application>
|
---|
[f1607a4] | 239 | tool Callgrind.
|
---|
| 240 | </para>
|
---|
| 241 | <indexterm zone="valgrind callgrind_control">
|
---|
| 242 | <primary sortas="b-callgrind_control">callgrind_control</primary>
|
---|
| 243 | </indexterm>
|
---|
| 244 | </listitem>
|
---|
| 245 | </varlistentry>
|
---|
| 246 |
|
---|
| 247 | <varlistentry id="cg_annotate">
|
---|
| 248 | <term><command>cg_annotate</command></term>
|
---|
| 249 | <listitem>
|
---|
| 250 | <para>
|
---|
[f3429309] | 251 | is a post-processing tool for the <application>Valgrind</application>
|
---|
[f1607a4] | 252 | tool Cachegrind.
|
---|
| 253 | </para>
|
---|
| 254 | <indexterm zone="valgrind cg_annotate">
|
---|
| 255 | <primary sortas="b-cg_annotate">cg_annotate</primary>
|
---|
| 256 | </indexterm>
|
---|
| 257 | </listitem>
|
---|
| 258 | </varlistentry>
|
---|
| 259 |
|
---|
| 260 | <varlistentry id="cg_diff">
|
---|
| 261 | <term><command>cg_diff</command></term>
|
---|
| 262 | <listitem>
|
---|
| 263 | <para>
|
---|
| 264 | compares two Cachegrind output files.
|
---|
| 265 | </para>
|
---|
| 266 | <indexterm zone="valgrind cg_diff">
|
---|
| 267 | <primary sortas="b-cg_diff">cg_diff</primary>
|
---|
| 268 | </indexterm>
|
---|
| 269 | </listitem>
|
---|
| 270 | </varlistentry>
|
---|
| 271 |
|
---|
| 272 | <varlistentry id="cg_merge">
|
---|
| 273 | <term><command>cg_merge</command></term>
|
---|
| 274 | <listitem>
|
---|
| 275 | <para>
|
---|
| 276 | merges multiple Cachegrind output files into one.
|
---|
| 277 | </para>
|
---|
| 278 | <indexterm zone="valgrind cg_merge">
|
---|
| 279 | <primary sortas="b-cg_merge">cg_merge</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
| 284 | <varlistentry id="ms_print">
|
---|
| 285 | <term><command>ms_print</command></term>
|
---|
| 286 | <listitem>
|
---|
| 287 | <para>
|
---|
| 288 | takes an output file produced by the <application>Valgrind</application>
|
---|
| 289 | tool Massif and prints the information in an easy-to-read form.
|
---|
| 290 | </para>
|
---|
| 291 | <indexterm zone="valgrind ms_print">
|
---|
| 292 | <primary sortas="b-ms_print">ms_print</primary>
|
---|
| 293 | </indexterm>
|
---|
| 294 | </listitem>
|
---|
| 295 | </varlistentry>
|
---|
| 296 |
|
---|
| 297 | <varlistentry id="valgrind-di-server">
|
---|
| 298 | <term><command>valgrind-di-server</command></term>
|
---|
| 299 | <listitem>
|
---|
| 300 | <para>
|
---|
[f3429309] | 301 | is a server that reads debuginfo from objects stored on a
|
---|
[f1607a4] | 302 | different machine.
|
---|
| 303 | </para>
|
---|
| 304 | <indexterm zone="valgrind valgrind-di-server">
|
---|
| 305 | <primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
|
---|
| 306 | </indexterm>
|
---|
| 307 | </listitem>
|
---|
| 308 | </varlistentry>
|
---|
| 309 |
|
---|
| 310 | <varlistentry id="valgrind-listener">
|
---|
| 311 | <term><command>valgrind-listener</command></term>
|
---|
| 312 | <listitem>
|
---|
| 313 | <para>
|
---|
| 314 | listens on a socket for Valgrind commentary.
|
---|
| 315 | </para>
|
---|
| 316 | <indexterm zone="valgrind valgrind-listener">
|
---|
| 317 | <primary sortas="b-valgrind-listener">valgrind-listener</primary>
|
---|
| 318 | </indexterm>
|
---|
| 319 | </listitem>
|
---|
| 320 | </varlistentry>
|
---|
| 321 |
|
---|
| 322 | <varlistentry id="vgdb">
|
---|
| 323 | <term><command>vgdb</command></term>
|
---|
| 324 | <listitem>
|
---|
| 325 | <para>
|
---|
| 326 | is an intermediary between Valgrind and GDB or a shell.
|
---|
| 327 | </para>
|
---|
| 328 | <indexterm zone="valgrind vgdb">
|
---|
| 329 | <primary sortas="b-vgdb">vgdb</primary>
|
---|
| 330 | </indexterm>
|
---|
| 331 | </listitem>
|
---|
| 332 | </varlistentry>
|
---|
| 333 |
|
---|
| 334 | </variablelist>
|
---|
| 335 |
|
---|
| 336 | </sect2>
|
---|
| 337 |
|
---|
| 338 | </sect1>
|
---|