source: general/prog/valgrind.xml@ c407a61

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 c407a61 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
Line 
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 "https://sourceware.org/pub/valgrind/valgrind-&valgrind-version;.tar.bz2">
8 <!ENTITY valgrind-download-ftp "ftp://sourceware.org/pub/valgrind/valgrind-&valgrind-version;.tar.bz2">
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)">
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
33 tools.
34 </para>
35
36 &lfs113_checked;
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>
71<!--
72 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
73 <itemizedlist spacing="compact">
74 <listitem>
75 <para>
76 Required patch:
77 <ulink url="&patch-root;/valgrind-&valgrind-version;-upstream_fixes-1.patch"/>
78 </para>
79 </listitem>
80 </itemizedlist>
81-->
82 <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
83
84 <bridgehead renderas="sect4">Optional</bridgehead>
85 <para role="optional">
86 <xref linkend="gdb"/> (for tests),
87 <xref linkend="llvm"/> (with Clang), and
88 <xref linkend="which"/> (for tests)
89 </para>
90
91<!-- See "maintainer note", below
92 <bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
93 <para role="optional">
94 <xref linkend="libxslt"/> and
95 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
96 </para>
97-->
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>
105<!--
106 <para>
107 First, make several changes that are required for Valgrind to function on
108 systems with glibc-2.35 installed:
109 </para>
110
111<screen><userinput remap="pre">patch -Np1 -i ../valgrind-&valgrind-version;-upstream_fixes-1.patch</userinput></screen>
112-->
113
114 <para>
115 Install <application>Valgrind</application> by running the following
116 commands:
117 </para>
118
119<screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &amp;&amp;
120
121./configure --prefix=/usr \
122 --datadir=/usr/share/doc/valgrind-&valgrind-version; &amp;&amp;
123make</userinput></screen>
124
125 <para>
126 To test the results, issue: <command>make regtest</command>. The tests
127 may hang forever if <xref linkend="gdb"/> is not installed. Some tests
128 are known to hang also, depending on the version of glibc. A few tests
129 can fail in various suites. Problematic
130 tests can be disabled by changing the <userinput>prereq:</userinput> line
131 in the corresponding <filename>.vgtest</filename> file to
132 <userinput>prereq: false</userinput>. For example:
133 </para>
134
135<screen role="nodump"><userinput>sed -e 's@prereq:.*@prereq: false@' \
136 -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest</userinput></screen>
137
138 <!-- 731 tests, 6 stderr failures, 0 stdout failures, 1 stderrB failure,
139 0 stdoutB failures, 1 post failure -bdubbs Apr 13. 22
140 valgrind-3.19.0
141
142 732 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure,
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)
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) -->
155
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
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>
184 <command>sed -i ... docs/Makefile.in </command>: This sed provides for
185 installing the documentation in a versioned directory.
186 </para>
187
188 <para>
189 <option>--enable-lto=yes</option>: This option allows building Valgrind
190 with LTO (link time optimization). This produces a smaller/faster
191 Valgrind (up to 10%), but build time increases to about 5.5 SBU.
192 </para>
193
194 </sect2>
195
196 <sect2 role="content">
197 <title>Contents</title>
198
199 <segmentedlist>
200 <segtitle>Installed Programs</segtitle>
201 <segtitle>Installed Libraries</segtitle>
202 <segtitle>Installed Directories</segtitle>
203
204 <seglistitem>
205 <seg>
206 callgrind_annotate,
207 callgrind_control,
208 cg_annotate,
209 cg_diff,
210 cg_merge,
211 ms_print,
212 valgrind,
213 valgrind-di-server,
214 valgrind-listener, and
215 vgdb
216 </seg>
217 <seg>
218 None
219 </seg>
220 <seg>
221 /usr/lib/valgrind,
222 /usr/libexec/valgrind,
223 /usr/include/valgrind, and
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>
238 is a program for debugging and profiling Linux executables
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
252 information in an easy-to-read form
253 </para>
254 <indexterm zone="valgrind callgrind_annotate">
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>
264 controls programs being run by the <application>Valgrind</application>
265 tool Callgrind
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>
277 is a post-processing tool for the <application>Valgrind</application>
278 tool Cachegrind
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>
290 compares two Cachegrind output files
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>
302 merges multiple Cachegrind output files into one
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>
315 tool Massif and prints the information in an easy-to-read form
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>
327 is a server that reads debuginfo from objects stored on a
328 different machine
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>
340 listens on a socket for Valgrind commentary
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>
352 is an intermediary between Valgrind and GDB or a shell
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.