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