source: general/prog/valgrind.xml@ fad9b8d

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since fad9b8d was 54d58907, checked in by Pierre Labastie <pierre.labastie@…>, 17 months ago

Remove eol spaces

  • Property mode set to 100644
File size: 11.5 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">
[7a6fad03]9 <!ENTITY valgrind-md5sum "e3ca8e03c6c527e80e7da5135a1b6beb">
[559cb4f]10 <!ENTITY valgrind-size "16 MB">
[7a6fad03]11 <!ENTITY valgrind-buildsize "381 MB (add 66 MB for tests)">
12 <!ENTITY valgrind-time "0.5 SBU (Using parallelism=4; add 8.1 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
[ecc2386]36 &lfs112_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)
148 drd/tests/pth_mutex_signal (stderr) -->
[559cb4f]149
[ae6d3b8]150 <note>
151 <para>
152 The <application>OpenMP</application> tests are skipped if libgomp
153 has been compiled with <option>--enable-linux-futex</option> (the
154 default). If needed, just recompile the libgomp library from
155 the gcc build tree, passing <option>--disable-linux-futex</option>
156 to configure, storing the library to some place and changing the link
157 from <filename>/usr/lib/libgomp.so.1</filename> to point to the new
158 library.
159 </para>
160 </note>
161
162<!-- Note to maintainer: there is a long thread in ticket #5882 explaining
163 why we do not provide instructions to rebuild the documentation.
164 (still broken with TeXLive 2016) -->
165
[f1607a4]166 <para>
167 Now, as the <systemitem class="username">root</systemitem> user:
168 </para>
169
170<screen role="root"><userinput>make install</userinput></screen>
171
172 </sect2>
173
174 <sect2 role="commands">
175 <title>Command Explanations</title>
176
177 <para>
[9dfdd942]178 <command>sed -i ... docs/Makefile.in </command>: This sed provides for
[f1607a4]179 installing the documentation in a versioned directory.
180 </para>
181
[d30b7e7]182 <para>
[8558044]183 <option>--enable-lto=yes</option>: This option allows building Valgrind
184 with LTO (link time optimization). This produces a smaller/faster
[d30b7e7]185 Valgrind (up to 10%), but build time increases to about 5.5 SBU.
186 </para>
187
[f1607a4]188 </sect2>
189
190 <sect2 role="content">
191 <title>Contents</title>
192
193 <segmentedlist>
194 <segtitle>Installed Programs</segtitle>
[a2ce753]195 <segtitle>Installed Libraries</segtitle>
[f1607a4]196 <segtitle>Installed Directories</segtitle>
197
198 <seglistitem>
199 <seg>
[f3429309]200 callgrind_annotate,
201 callgrind_control,
202 cg_annotate,
203 cg_diff,
204 cg_merge,
205 ms_print,
206 valgrind,
[f1607a4]207 valgrind-di-server,
[f3429309]208 valgrind-listener, and
[f1607a4]209 vgdb
210 </seg>
211 <seg>
[a2ce753]212 None
[f1607a4]213 </seg>
214 <seg>
215 /usr/lib/valgrind,
[50cbddce]216 /usr/libexec/valgrind,
[f3429309]217 /usr/include/valgrind, and
[f1607a4]218 /usr/share/doc/valgrind-&valgrind-version;
219 </seg>
220 </seglistitem>
221 </segmentedlist>
222
223 <variablelist>
224 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
225 <?dbfo list-presentation="list"?>
226 <?dbhtml list-presentation="table"?>
227
228 <varlistentry id="valgrind-prog">
229 <term><command>valgrind</command></term>
230 <listitem>
231 <para>
[4c24eb0a]232 is a program for debugging and profiling Linux executables
[f1607a4]233 </para>
234 <indexterm zone="valgrind valgrind-prog">
235 <primary sortas="b-valgrind">valgrind</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry id="callgrind_annotate">
241 <term><command>callgrind_annotate</command></term>
242 <listitem>
243 <para>
244 takes an output file produced by the
245 <application>Valgrind</application> tool Callgrind and prints the
[4c24eb0a]246 information in an easy-to-read form
[f1607a4]247 </para>
[6076396]248 <indexterm zone="valgrind callgrind_annotate">
[f1607a4]249 <primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
250 </indexterm>
251 </listitem>
252 </varlistentry>
253
254 <varlistentry id="callgrind_control">
255 <term><command>callgrind_control</command></term>
256 <listitem>
257 <para>
[f3429309]258 controls programs being run by the <application>Valgrind</application>
[4c24eb0a]259 tool Callgrind
[f1607a4]260 </para>
261 <indexterm zone="valgrind callgrind_control">
262 <primary sortas="b-callgrind_control">callgrind_control</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
267 <varlistentry id="cg_annotate">
268 <term><command>cg_annotate</command></term>
269 <listitem>
270 <para>
[f3429309]271 is a post-processing tool for the <application>Valgrind</application>
[4c24eb0a]272 tool Cachegrind
[f1607a4]273 </para>
274 <indexterm zone="valgrind cg_annotate">
275 <primary sortas="b-cg_annotate">cg_annotate</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="cg_diff">
281 <term><command>cg_diff</command></term>
282 <listitem>
283 <para>
[4c24eb0a]284 compares two Cachegrind output files
[f1607a4]285 </para>
286 <indexterm zone="valgrind cg_diff">
287 <primary sortas="b-cg_diff">cg_diff</primary>
288 </indexterm>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry id="cg_merge">
293 <term><command>cg_merge</command></term>
294 <listitem>
295 <para>
[4c24eb0a]296 merges multiple Cachegrind output files into one
[f1607a4]297 </para>
298 <indexterm zone="valgrind cg_merge">
299 <primary sortas="b-cg_merge">cg_merge</primary>
300 </indexterm>
301 </listitem>
302 </varlistentry>
303
304 <varlistentry id="ms_print">
305 <term><command>ms_print</command></term>
306 <listitem>
307 <para>
308 takes an output file produced by the <application>Valgrind</application>
[4c24eb0a]309 tool Massif and prints the information in an easy-to-read form
[f1607a4]310 </para>
311 <indexterm zone="valgrind ms_print">
312 <primary sortas="b-ms_print">ms_print</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 <varlistentry id="valgrind-di-server">
318 <term><command>valgrind-di-server</command></term>
319 <listitem>
320 <para>
[f3429309]321 is a server that reads debuginfo from objects stored on a
[4c24eb0a]322 different machine
[f1607a4]323 </para>
324 <indexterm zone="valgrind valgrind-di-server">
325 <primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 <varlistentry id="valgrind-listener">
331 <term><command>valgrind-listener</command></term>
332 <listitem>
333 <para>
[4c24eb0a]334 listens on a socket for Valgrind commentary
[f1607a4]335 </para>
336 <indexterm zone="valgrind valgrind-listener">
337 <primary sortas="b-valgrind-listener">valgrind-listener</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
342 <varlistentry id="vgdb">
343 <term><command>vgdb</command></term>
344 <listitem>
345 <para>
[4c24eb0a]346 is an intermediary between Valgrind and GDB or a shell
[f1607a4]347 </para>
348 <indexterm zone="valgrind vgdb">
349 <primary sortas="b-vgdb">vgdb</primary>
350 </indexterm>
351 </listitem>
352 </varlistentry>
353
354 </variablelist>
355
356 </sect2>
357
358</sect1>
Note: See TracBrowser for help on using the repository browser.