source: general/prog/valgrind.xml@ 50cbddce

10.0 10.1 11.0 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 50cbddce was 50cbddce, checked in by Douglas R. Reno <renodr@…>, 17 months ago

Update to babl-0.1.76
Update to Net::DNS-1.24 (Perl Module)
Update to valgrind-3.16.0
Update to poppler-0.89.0
Update to cryptsetup-2.3.3
Update to cmake-3.17.3

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23211 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.6 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/ftp/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 "495b30af5e5ed62ebb9bb777ee19b27f">
10 <!ENTITY valgrind-size "16 MB">
11 <!ENTITY valgrind-buildsize "615 MB (add 100 MB for tests)">
12 <!ENTITY valgrind-time "0.5 SBU (Using parallelism=4; add 7.9 SBU for tests)">
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
37 tools.
38 </para>
39
40 &lfs91_checked;
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<!-- Not needed with 3.16.0
77 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
78 <itemizedlist spacing="compact">
79 <listitem>
80 <para>
81 Required patch:
82 <ulink url="&patch-root;/valgrind-&valgrind-version;-gcc_10-fixes-1.patch"/>
83 </para>
84 </listitem>
85 </itemizedlist>
86-->
87
88 <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
89
90 <bridgehead renderas="sect4">Optional</bridgehead>
91 <para role="optional">
92 <xref linkend="bind"/> or <xref linkend="bind-utils"/> (for tests),
93 <xref linkend="boost"/>,
94 <xref linkend="gdb"/> (for tests),
95 <xref linkend="llvm"/> (with Clang), and
96 <xref linkend="which"/> (for tests)
97 </para>
98
99<!-- See "maintainer note", below
100 <bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
101 <para role="optional">
102 <xref linkend="libxslt"/> and
103 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
104 </para>
105-->
106 <para condition="html" role="usernotes">User Notes:
107 <ulink url="&blfs-wiki;/valgrind"/>
108 </para>
109 </sect2>
110
111 <sect2 role="installation">
112 <title>Installation of Valgrind</title>
113
114<!-- Not needed with 3.16.0
115 <para>
116 First, adapt the tests to GCC-10, and fix the build:
117 </para>
118
119<screen><userinput remap="pre">patch -Np1 -i ../valgrind-&valgrind-version;-gcc_10-fixes-1.patch</userinput></screen>
120-->
121
122 <para>
123 Install <application>Valgrind</application> by running the following
124 commands:
125 </para>
126
127<screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &amp;&amp;
128
129./configure --prefix=/usr \
130 --datadir=/usr/share/doc/valgrind-&valgrind-version; &amp;&amp;
131make</userinput></screen>
132
133 <para>
134 To test the results, issue: <command>make regtest</command>. The tests
135 may hang forever if <xref linkend="gdb"/> is not installed. Some tests
136 are known to hang also, depending on the version of glibc. Problematic
137 tests can be disabled by changing the <userinput>prereq:</userinput> line
138 in the corresponding <filename>.vgtest</filename> file to
139 <userinput>prereq: false</userinput>. For example:
140 </para>
141
142<screen><userinput>sed -e 's@prereq:.*@prereq: false@' \
143 -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest</userinput></screen>
144
145 <note>
146 <para>
147 The <application>OpenMP</application> tests are skipped if libgomp
148 has been compiled with <option>--enable-linux-futex</option> (the
149 default). If needed, just recompile the libgomp library from
150 the gcc build tree, passing <option>--disable-linux-futex</option>
151 to configure, storing the library to some place and changing the link
152 from <filename>/usr/lib/libgomp.so.1</filename> to point to the new
153 library.
154 </para>
155 </note>
156
157<!-- Note to maintainer: there is a long thread in ticket #5882 explaining
158 why we do not provide instructions to rebuild the documentation.
159 (still broken with TeXLive 2016) -->
160
161 <para>
162 Now, as the <systemitem class="username">root</systemitem> user:
163 </para>
164
165<screen role="root"><userinput>make install</userinput></screen>
166
167 </sect2>
168
169 <sect2 role="commands">
170 <title>Command Explanations</title>
171
172 <para>
173 <command>sed -i ... docs/Makefile.in </command>: This sed provides for
174 installing the documentation in a versioned directory.
175 </para>
176
177 <para>
178 <option>--enable-lto=yes</option>: This option allows building Valgrind
179 with LTO (link time optimization). This produces a smaller/faster
180 Valgrind (up to 10%), but build time increases to about 5.5 SBU.
181 </para>
182
183 </sect2>
184
185 <sect2 role="content">
186 <title>Contents</title>
187
188 <segmentedlist>
189 <segtitle>Installed Programs</segtitle>
190 <segtitle>Installed Library</segtitle>
191 <segtitle>Installed Directories</segtitle>
192
193 <seglistitem>
194 <seg>
195 callgrind_annotate,
196 callgrind_control,
197 cg_annotate,
198 cg_diff,
199 cg_merge,
200 ms_print,
201 valgrind,
202 valgrind-di-server,
203 valgrind-listener, and
204 vgdb
205 </seg>
206 <seg>
207 libcoregrind-&lt;Arch&gt;-linux.a,
208 libgcc-sup-&lt;Arch&gt;-linux.a,
209 libreplacemalloc_toolpreload-&lt;Arch&gt;-linux.a,
210 libvex-&lt;Arch&gt;-linux.a,
211 libvexmultiarch-amd64-linux.a,
212 vgpreload_core-&lt;Arch&gt;-linux.so,
213 vgpreload_drd-&lt;Arch&gt;-linux.so,
214 vgpreload_exp-dhat-&lt;Arch&gt;-linux.so,
215 vgpreload_helgrind-&lt;Arch&gt;-linux.so,
216 vgpreload_massif-&lt;Arch&gt;-linux.so, and
217 vgpreload_memcheck-&lt;Arch&gt;-linux.so, where
218 &lt;Arch&gt; is x86 or amd64
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.