source: general/prog/valgrind.xml@ 05374c3

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 05374c3 was dd1d7641, checked in by Bruce Dubbs <bdubbs@…>, 14 months ago

Update to valgrind-3.21.0.

  • Property mode set to 100644
File size: 11.8 KB
RevLine 
[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
[141ee0a5]7 <!ENTITY valgrind-download-http "https://sourceware.org/pub/valgrind/valgrind-&valgrind-version;.tar.bz2">
[ec67287]8 <!ENTITY valgrind-download-ftp "ftp://sourceware.org/pub/valgrind/valgrind-&valgrind-version;.tar.bz2">
[dd1d7641]9 <!ENTITY valgrind-md5sum "b8b89b327732c12191306c3d31cfd4b1">
10 <!ENTITY valgrind-size "17 MB">
11 <!ENTITY valgrind-buildsize "388 MB (add 66 MB for tests)">
12 <!ENTITY valgrind-time "0.5 SBU (Using parallelism=4; add 8.4 SBU for tests)">
[f1607a4]13]>
14
15<sect1 id="valgrind" xreflabel="Valgrind-&valgrind-version;">
16 <?dbhtml filename="valgrind.html"?>
17
18
19 <title>Valgrind-&valgrind-version;</title>
20
21 <indexterm zone="valgrind">
22 <primary sortas="a-Valgrind">Valgrind</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Valgrind</title>
27
28 <para>
29 <application>Valgrind</application> is an instrumentation framework for
30 building dynamic analysis tools. There are Valgrind tools that can
31 automatically detect many memory management and threading bugs, and
32 profile programs in detail. Valgrind can also be used to build new
[f3429309]33 tools.
[f1607a4]34 </para>
35
[09a464a]36 &lfs113_checked;
[f1607a4]37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>
42 Download (HTTP): <ulink url="&valgrind-download-http;"/>
43 </para>
44 </listitem>
45 <listitem>
46 <para>
47 Download (FTP): <ulink url="&valgrind-download-ftp;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download MD5 sum: &valgrind-md5sum;
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download size: &valgrind-size;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Estimated disk space required: &valgrind-buildsize;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated build time: &valgrind-time;
68 </para>
69 </listitem>
70 </itemizedlist>
[559cb4f]71<!--
[a67b5f3]72 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
73 <itemizedlist spacing="compact">
74 <listitem>
75 <para>
76 Required patch:
[2c76fcd]77 <ulink url="&patch-root;/valgrind-&valgrind-version;-upstream_fixes-1.patch"/>
[a67b5f3]78 </para>
79 </listitem>
80 </itemizedlist>
[559cb4f]81-->
[f1607a4]82 <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
83
84 <bridgehead renderas="sect4">Optional</bridgehead>
85 <para role="optional">
[8558044]86 <xref linkend="gdb"/> (for tests),
[ae6d3b8]87 <xref linkend="llvm"/> (with Clang), and
88 <xref linkend="which"/> (for tests)
[f1607a4]89 </para>
90
[ae6d3b8]91<!-- See "maintainer note", below
[f1607a4]92 <bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
93 <para role="optional">
[f3429309]94 <xref linkend="libxslt"/> and
[2d98031c]95 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
[f1607a4]96 </para>
[ae6d3b8]97-->
[f1607a4]98 <para condition="html" role="usernotes">User Notes:
99 <ulink url="&blfs-wiki;/valgrind"/>
100 </para>
101 </sect2>
102
103 <sect2 role="installation">
104 <title>Installation of Valgrind</title>
[559cb4f]105<!--
[a67b5f3]106 <para>
[2c76fcd]107 First, make several changes that are required for Valgrind to function on
[0ebcf2e]108 systems with glibc-2.35 installed:
[a67b5f3]109 </para>
110
[2c76fcd]111<screen><userinput remap="pre">patch -Np1 -i ../valgrind-&valgrind-version;-upstream_fixes-1.patch</userinput></screen>
[559cb4f]112-->
[a67b5f3]113
[bbe0fbf]114 <para>
115 Install <application>Valgrind</application> by running the following
[1b0d0188]116 commands:
117 </para>
118
[141ee0a5]119<screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &amp;&amp;
[1b0d0188]120
121./configure --prefix=/usr \
[f1607a4]122 --datadir=/usr/share/doc/valgrind-&valgrind-version; &amp;&amp;
123make</userinput></screen>
124
125 <para>
[bbe0fbf]126 To test the results, issue: <command>make regtest</command>. The tests
[ae6d3b8]127 may hang forever if <xref linkend="gdb"/> is not installed. Some tests
[559cb4f]128 are known to hang also, depending on the version of glibc. A few tests
129 can fail in various suites. Problematic
[ae6d3b8]130 tests can be disabled by changing the <userinput>prereq:</userinput> line
[0639bb6]131 in the corresponding <filename>.vgtest</filename> file to
[ae6d3b8]132 <userinput>prereq: false</userinput>. For example:
[f1607a4]133 </para>
134
[141ee0a5]135<screen role="nodump"><userinput>sed -e 's@prereq:.*@prereq: false@' \
[ae6d3b8]136 -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest</userinput></screen>
137
[7a9a7b26]138 <!-- 731 tests, 6 stderr failures, 0 stdout failures, 1 stderrB failure,
139 0 stdoutB failures, 1 post failure -bdubbs Apr 13. 22
[54d58907]140 valgrind-3.19.0
[7a6fad03]141
[54d58907]142 732 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure,
[7a6fad03]143 0 stdoutB failures, 1 post failure - bdubbs Oct 26, 22
144 gdbserver_tests/hginfo (stderrB)
145 memcheck/tests/cdebug_zlib_gnu (stderr)
146 memcheck/tests/overlap (stderr)
147 helgrind/tests/tls_threads (stderr)
[dd1d7641]148 drd/tests/pth_mutex_signal (stderr)
149
150 765 tests, 2 stderr failures, 0 stdout failures, 0 stderrB failure,
151 0 stdoutB failures, 0 post failure -bdubbs May 2, 23
152 valgrind-3.21.0
153 memcheck/tests/overlap (stderr)
154 helgrind/tests/pth_mempcpy_false_races (stderr) -->
[559cb4f]155
[ae6d3b8]156 <note>
157 <para>
158 The <application>OpenMP</application> tests are skipped if libgomp
159 has been compiled with <option>--enable-linux-futex</option> (the
160 default). If needed, just recompile the libgomp library from
161 the gcc build tree, passing <option>--disable-linux-futex</option>
162 to configure, storing the library to some place and changing the link
163 from <filename>/usr/lib/libgomp.so.1</filename> to point to the new
164 library.
165 </para>
166 </note>
167
168<!-- Note to maintainer: there is a long thread in ticket #5882 explaining
169 why we do not provide instructions to rebuild the documentation.
170 (still broken with TeXLive 2016) -->
171
[f1607a4]172 <para>
173 Now, as the <systemitem class="username">root</systemitem> user:
174 </para>
175
176<screen role="root"><userinput>make install</userinput></screen>
177
178 </sect2>
179
180 <sect2 role="commands">
181 <title>Command Explanations</title>
182
183 <para>
[9dfdd942]184 <command>sed -i ... docs/Makefile.in </command>: This sed provides for
[f1607a4]185 installing the documentation in a versioned directory.
186 </para>
187
[d30b7e7]188 <para>
[8558044]189 <option>--enable-lto=yes</option>: This option allows building Valgrind
190 with LTO (link time optimization). This produces a smaller/faster
[d30b7e7]191 Valgrind (up to 10%), but build time increases to about 5.5 SBU.
192 </para>
193
[f1607a4]194 </sect2>
195
196 <sect2 role="content">
197 <title>Contents</title>
198
199 <segmentedlist>
200 <segtitle>Installed Programs</segtitle>
[a2ce753]201 <segtitle>Installed Libraries</segtitle>
[f1607a4]202 <segtitle>Installed Directories</segtitle>
203
204 <seglistitem>
205 <seg>
[f3429309]206 callgrind_annotate,
207 callgrind_control,
208 cg_annotate,
209 cg_diff,
210 cg_merge,
211 ms_print,
212 valgrind,
[f1607a4]213 valgrind-di-server,
[f3429309]214 valgrind-listener, and
[f1607a4]215 vgdb
216 </seg>
217 <seg>
[a2ce753]218 None
[f1607a4]219 </seg>
220 <seg>
221 /usr/lib/valgrind,
[50cbddce]222 /usr/libexec/valgrind,
[f3429309]223 /usr/include/valgrind, and
[f1607a4]224 /usr/share/doc/valgrind-&valgrind-version;
225 </seg>
226 </seglistitem>
227 </segmentedlist>
228
229 <variablelist>
230 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
231 <?dbfo list-presentation="list"?>
232 <?dbhtml list-presentation="table"?>
233
234 <varlistentry id="valgrind-prog">
235 <term><command>valgrind</command></term>
236 <listitem>
237 <para>
[4c24eb0a]238 is a program for debugging and profiling Linux executables
[f1607a4]239 </para>
240 <indexterm zone="valgrind valgrind-prog">
241 <primary sortas="b-valgrind">valgrind</primary>
242 </indexterm>
243 </listitem>
244 </varlistentry>
245
246 <varlistentry id="callgrind_annotate">
247 <term><command>callgrind_annotate</command></term>
248 <listitem>
249 <para>
250 takes an output file produced by the
251 <application>Valgrind</application> tool Callgrind and prints the
[4c24eb0a]252 information in an easy-to-read form
[f1607a4]253 </para>
[6076396]254 <indexterm zone="valgrind callgrind_annotate">
[f1607a4]255 <primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="callgrind_control">
261 <term><command>callgrind_control</command></term>
262 <listitem>
263 <para>
[f3429309]264 controls programs being run by the <application>Valgrind</application>
[4c24eb0a]265 tool Callgrind
[f1607a4]266 </para>
267 <indexterm zone="valgrind callgrind_control">
268 <primary sortas="b-callgrind_control">callgrind_control</primary>
269 </indexterm>
270 </listitem>
271 </varlistentry>
272
273 <varlistentry id="cg_annotate">
274 <term><command>cg_annotate</command></term>
275 <listitem>
276 <para>
[f3429309]277 is a post-processing tool for the <application>Valgrind</application>
[4c24eb0a]278 tool Cachegrind
[f1607a4]279 </para>
280 <indexterm zone="valgrind cg_annotate">
281 <primary sortas="b-cg_annotate">cg_annotate</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="cg_diff">
287 <term><command>cg_diff</command></term>
288 <listitem>
289 <para>
[4c24eb0a]290 compares two Cachegrind output files
[f1607a4]291 </para>
292 <indexterm zone="valgrind cg_diff">
293 <primary sortas="b-cg_diff">cg_diff</primary>
294 </indexterm>
295 </listitem>
296 </varlistentry>
297
298 <varlistentry id="cg_merge">
299 <term><command>cg_merge</command></term>
300 <listitem>
301 <para>
[4c24eb0a]302 merges multiple Cachegrind output files into one
[f1607a4]303 </para>
304 <indexterm zone="valgrind cg_merge">
305 <primary sortas="b-cg_merge">cg_merge</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="ms_print">
311 <term><command>ms_print</command></term>
312 <listitem>
313 <para>
314 takes an output file produced by the <application>Valgrind</application>
[4c24eb0a]315 tool Massif and prints the information in an easy-to-read form
[f1607a4]316 </para>
317 <indexterm zone="valgrind ms_print">
318 <primary sortas="b-ms_print">ms_print</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="valgrind-di-server">
324 <term><command>valgrind-di-server</command></term>
325 <listitem>
326 <para>
[f3429309]327 is a server that reads debuginfo from objects stored on a
[4c24eb0a]328 different machine
[f1607a4]329 </para>
330 <indexterm zone="valgrind valgrind-di-server">
331 <primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
332 </indexterm>
333 </listitem>
334 </varlistentry>
335
336 <varlistentry id="valgrind-listener">
337 <term><command>valgrind-listener</command></term>
338 <listitem>
339 <para>
[4c24eb0a]340 listens on a socket for Valgrind commentary
[f1607a4]341 </para>
342 <indexterm zone="valgrind valgrind-listener">
343 <primary sortas="b-valgrind-listener">valgrind-listener</primary>
344 </indexterm>
345 </listitem>
346 </varlistentry>
347
348 <varlistentry id="vgdb">
349 <term><command>vgdb</command></term>
350 <listitem>
351 <para>
[4c24eb0a]352 is an intermediary between Valgrind and GDB or a shell
[f1607a4]353 </para>
354 <indexterm zone="valgrind vgdb">
355 <primary sortas="b-vgdb">vgdb</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
359
360 </variablelist>
361
362 </sect2>
363
364</sect1>
Note: See TracBrowser for help on using the repository browser.