mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 23:32:12 +08:00
368 lines
12 KiB
XML
368 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY valgrind-download-http "https://sourceware.org/pub/valgrind/valgrind-&valgrind-version;.tar.bz2">
|
|
<!ENTITY valgrind-download-ftp " ">
|
|
<!ENTITY valgrind-md5sum "38ea14f567efa09687a822b33b4d9d60">
|
|
<!ENTITY valgrind-size "16 MB">
|
|
<!ENTITY valgrind-buildsize "390 MB (add 66 MB for tests)">
|
|
<!ENTITY valgrind-time "0.5 SBU (add 6.8 SBU for tests; both using parallelism=4)">
|
|
]>
|
|
|
|
<sect1 id="valgrind" xreflabel="Valgrind-&valgrind-version;">
|
|
<?dbhtml filename="valgrind.html"?>
|
|
|
|
|
|
<title>Valgrind-&valgrind-version;</title>
|
|
|
|
<indexterm zone="valgrind">
|
|
<primary sortas="a-Valgrind">Valgrind</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to Valgrind</title>
|
|
|
|
<para>
|
|
<application>Valgrind</application> is an instrumentation framework for
|
|
building dynamic analysis tools. There are Valgrind tools that can
|
|
automatically detect many memory management and threading bugs, and
|
|
profile programs in detail. Valgrind can also be used to build new
|
|
tools.
|
|
</para>
|
|
|
|
&lfs120_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&valgrind-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&valgrind-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &valgrind-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &valgrind-size;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated disk space required: &valgrind-buildsize;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated build time: &valgrind-time;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<!--
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Required patch:
|
|
<ulink url="&patch-root;/valgrind-&valgrind-version;-upstream_fixes-1.patch"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
-->
|
|
<bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="gdb"/> (for tests),
|
|
<xref linkend="llvm"/> (with Clang), and
|
|
<xref linkend="which"/> (for tests)
|
|
</para>
|
|
|
|
<!-- See "maintainer note", below
|
|
<bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="libxslt"/> and
|
|
<xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
|
|
</para>
|
|
-->
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Valgrind</title>
|
|
<!--
|
|
<para>
|
|
First, make several changes that are required for Valgrind to function on
|
|
systems with glibc-2.35 installed:
|
|
</para>
|
|
|
|
<screen><userinput remap="pre">patch -Np1 -i ../valgrind-&valgrind-version;-upstream_fixes-1.patch</userinput></screen>
|
|
-->
|
|
|
|
<para>
|
|
Install <application>Valgrind</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &&
|
|
|
|
./configure --prefix=/usr \
|
|
--datadir=/usr/share/doc/valgrind-&valgrind-version; &&
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
To test the results, issue: <command>make regtest</command>. The tests
|
|
may hang forever if <xref linkend="gdb"/> is not installed. Some tests
|
|
are known to hang also, depending on the version of glibc. A few tests
|
|
can fail in various suites. Problematic
|
|
tests can be disabled by changing the <userinput>prereq:</userinput> line
|
|
in the corresponding <filename>.vgtest</filename> file to
|
|
<userinput>prereq: false</userinput>. For example:
|
|
</para>
|
|
|
|
<screen role="nodump"><userinput>sed -e 's@prereq:.*@prereq: false@' \
|
|
-i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest</userinput></screen>
|
|
|
|
<!-- 731 tests, 6 stderr failures, 0 stdout failures, 1 stderrB failure,
|
|
0 stdoutB failures, 1 post failure -bdubbs Apr 13. 22
|
|
valgrind-3.19.0
|
|
|
|
732 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure,
|
|
0 stdoutB failures, 1 post failure - bdubbs Oct 26, 22
|
|
gdbserver_tests/hginfo (stderrB)
|
|
memcheck/tests/cdebug_zlib_gnu (stderr)
|
|
memcheck/tests/overlap (stderr)
|
|
helgrind/tests/tls_threads (stderr)
|
|
drd/tests/pth_mutex_signal (stderr)
|
|
|
|
765 tests, 2 stderr failures, 0 stdout failures, 0 stderrB failure,
|
|
0 stdoutB failures, 0 post failure -bdubbs May 2, 23
|
|
valgrind-3.21.0
|
|
memcheck/tests/overlap (stderr)
|
|
helgrind/tests/pth_mempcpy_false_races (stderr)
|
|
|
|
792 tests, 1 stderr failure, 0 stdout failures, 0 stderrB failures,
|
|
0 stdoutB failures, 0 post failures
|
|
valgrind-3.22.0
|
|
helgrind/tests/pth_mempcpy_false_races (stderr)
|
|
-->
|
|
|
|
<note>
|
|
<para>
|
|
The <application>OpenMP</application> tests are skipped if libgomp
|
|
has been compiled with <option>--enable-linux-futex</option> (the
|
|
default). If needed, just recompile the libgomp library from
|
|
the gcc build tree, passing <option>--disable-linux-futex</option>
|
|
to configure, storing the library to some place and changing the link
|
|
from <filename>/usr/lib/libgomp.so.1</filename> to point to the new
|
|
library.
|
|
</para>
|
|
</note>
|
|
|
|
<!-- Note to maintainer: there is a long thread in ticket #5882 explaining
|
|
why we do not provide instructions to rebuild the documentation.
|
|
(still broken with TeXLive 2016) -->
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para>
|
|
<command>sed -i ... docs/Makefile.in </command>: This sed provides for
|
|
installing the documentation in a versioned directory.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--enable-lto=yes</option>: This option allows building Valgrind
|
|
with LTO (link time optimization). This produces a smaller/faster
|
|
Valgrind (up to 10%), but build time increases to about 5.5 SBU.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>
|
|
callgrind_annotate,
|
|
callgrind_control,
|
|
cg_annotate,
|
|
cg_diff,
|
|
cg_merge,
|
|
ms_print,
|
|
valgrind,
|
|
valgrind-di-server,
|
|
valgrind-listener, and
|
|
vgdb
|
|
</seg>
|
|
<seg>
|
|
None
|
|
</seg>
|
|
<seg>
|
|
/usr/lib/valgrind,
|
|
/usr/libexec/valgrind,
|
|
/usr/include/valgrind, and
|
|
/usr/share/doc/valgrind-&valgrind-version;
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="valgrind-prog">
|
|
<term><command>valgrind</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a program for debugging and profiling Linux executables
|
|
</para>
|
|
<indexterm zone="valgrind valgrind-prog">
|
|
<primary sortas="b-valgrind">valgrind</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="callgrind_annotate">
|
|
<term><command>callgrind_annotate</command></term>
|
|
<listitem>
|
|
<para>
|
|
takes an output file produced by the
|
|
<application>Valgrind</application> tool Callgrind and prints the
|
|
information in an easy-to-read form
|
|
</para>
|
|
<indexterm zone="valgrind callgrind_annotate">
|
|
<primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="callgrind_control">
|
|
<term><command>callgrind_control</command></term>
|
|
<listitem>
|
|
<para>
|
|
controls programs being run by the <application>Valgrind</application>
|
|
tool Callgrind
|
|
</para>
|
|
<indexterm zone="valgrind callgrind_control">
|
|
<primary sortas="b-callgrind_control">callgrind_control</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="cg_annotate">
|
|
<term><command>cg_annotate</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a post-processing tool for the <application>Valgrind</application>
|
|
tool Cachegrind
|
|
</para>
|
|
<indexterm zone="valgrind cg_annotate">
|
|
<primary sortas="b-cg_annotate">cg_annotate</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="cg_diff">
|
|
<term><command>cg_diff</command></term>
|
|
<listitem>
|
|
<para>
|
|
compares two Cachegrind output files
|
|
</para>
|
|
<indexterm zone="valgrind cg_diff">
|
|
<primary sortas="b-cg_diff">cg_diff</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="cg_merge">
|
|
<term><command>cg_merge</command></term>
|
|
<listitem>
|
|
<para>
|
|
merges multiple Cachegrind output files into one
|
|
</para>
|
|
<indexterm zone="valgrind cg_merge">
|
|
<primary sortas="b-cg_merge">cg_merge</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ms_print">
|
|
<term><command>ms_print</command></term>
|
|
<listitem>
|
|
<para>
|
|
takes an output file produced by the <application>Valgrind</application>
|
|
tool Massif and prints the information in an easy-to-read form
|
|
</para>
|
|
<indexterm zone="valgrind ms_print">
|
|
<primary sortas="b-ms_print">ms_print</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="valgrind-di-server">
|
|
<term><command>valgrind-di-server</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a server that reads debuginfo from objects stored on a
|
|
different machine
|
|
</para>
|
|
<indexterm zone="valgrind valgrind-di-server">
|
|
<primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="valgrind-listener">
|
|
<term><command>valgrind-listener</command></term>
|
|
<listitem>
|
|
<para>
|
|
listens on a socket for Valgrind commentary
|
|
</para>
|
|
<indexterm zone="valgrind valgrind-listener">
|
|
<primary sortas="b-valgrind-listener">valgrind-listener</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="vgdb">
|
|
<term><command>vgdb</command></term>
|
|
<listitem>
|
|
<para>
|
|
is an intermediary between Valgrind and GDB or a shell
|
|
</para>
|
|
<indexterm zone="valgrind vgdb">
|
|
<primary sortas="b-vgdb">vgdb</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|