source: general/prog/valgrind.xml@ 83dc192

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 83dc192 was 6961e423, checked in by Ken Moffat <ken@…>, 6 years ago

Remove old text about symlinking a dbg version of ld: for any LFS build from the last fourteen months that will make the system both unusable and unbootable.

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

  • Property mode set to 100644
File size: 11.2 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 "817dd08f1e8a66336b9ff206400a5369">
10 <!ENTITY valgrind-size "14 MB">
11 <!ENTITY valgrind-buildsize "347 MB (additional 228 MB for tests)">
12 <!ENTITY valgrind-time "1.1 SBU (additional 5.1 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 &lfs82_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 <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
80 <xref linkend="bind"/> or <xref linkend="bind-utils"/> (for tests),
81 <xref linkend="boost"/>,
82 <xref linkend="gdb"/> (for tests),
83 <xref linkend="llvm"/> (with Clang), and
84 <xref linkend="which"/> (for tests)
85 </para>
86
87<!-- See "maintainer note", below
88 <bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
89 <para role="optional">
90 <xref linkend="libxslt"/> and
91 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
92 </para>
93-->
94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/valgrind"/>
96 </para>
97 </sect2>
98
99 <sect2 role="installation">
100 <title>Installation of Valgrind</title>
101
102<!-- Fix applied upstream, remove in valgrind 1.14-->
103 <para>
104 First, fix a bug, which has been exposed by glibc-2.26:
105 </para>
106
107<screen><userinput>sed -i '1904s/4/5/' coregrind/m_syswrap/syswrap-linux.c</userinput></screen>
108
109 <para>
110 Install <application>Valgrind</application> by running the following
111 commands:
112 </para>
113
114<screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &amp;&amp;
115
116./configure --prefix=/usr \
117 --datadir=/usr/share/doc/valgrind-&valgrind-version; &amp;&amp;
118make</userinput></screen>
119
120 <para>
121 To test the results, issue: <command>make regtest</command>. The tests
122 may hang forever if <xref linkend="gdb"/> is not installed. Some tests
123 are known to hang also, depending on the version of glibc. Problematic
124 tests can be disabled by changing the <userinput>prereq:</userinput> line
125 in the corresponding <filename>.vgtest</filename> file to
126 <userinput>prereq: false</userinput>. For example:
127 </para>
128
129<!-- For valgrind-3.12.0, the pth_cond_destroy_busy test hangs forever because
130 of some change in glibc-2.25. Should be fixed in next versions of
131 valgrind.-->
132<screen><userinput>sed -e 's@prereq:.*@prereq: false@' \
133 -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest</userinput></screen>
134
135 <note>
136 <para>
137 The <application>OpenMP</application> tests are skipped if libgomp
138 has been compiled with <option>--enable-linux-futex</option> (the
139 default). If needed, just recompile the libgomp library from
140 the gcc build tree, passing <option>--disable-linux-futex</option>
141 to configure, storing the library to some place and changing the link
142 from <filename>/usr/lib/libgomp.so.1</filename> to point to the new
143 library.
144 </para>
145 </note>
146
147<!-- Note to maintainer: there is a long thread in ticket #5882 explaining
148 why we do not provide instructions to rebuild the documentation.
149 (still broken with TeXLive 2016) -->
150
151 <para>
152 Now, as the <systemitem class="username">root</systemitem> user:
153 </para>
154
155<screen role="root"><userinput>make install</userinput></screen>
156
157 </sect2>
158
159 <sect2 role="commands">
160 <title>Command Explanations</title>
161
162 <para>
163 <command>sed -i ... docs/Makefile.in </command>: This sed provides for
164 installing the documentation in a versioned directory.
165 </para>
166
167 </sect2>
168
169 <sect2 role="content">
170 <title>Contents</title>
171
172 <segmentedlist>
173 <segtitle>Installed Programs</segtitle>
174 <segtitle>Installed Library</segtitle>
175 <segtitle>Installed Directories</segtitle>
176
177 <seglistitem>
178 <seg>
179 callgrind_annotate,
180 callgrind_control,
181 cg_annotate,
182 cg_diff,
183 cg_merge,
184 ms_print,
185 valgrind,
186 valgrind-di-server,
187 valgrind-listener, and
188 vgdb
189 </seg>
190 <seg>
191 libcoregrind-&lt;Arch&gt;-linux.a,
192 libreplacemalloc_toolpreload-&lt;Arch&gt;-linux.a,
193 libvex-&lt;Arch&gt;-linux.a,
194 libvexmultiarch-amd64-linux.a,
195 vgpreload_core-&lt;Arch&gt;-linux.so,
196 vgpreload_drd-&lt;Arch&gt;-linux.so,
197 vgpreload_exp-dhat-&lt;Arch&gt;-linux.so,
198 vgpreload_exp-sgcheck-&lt;Arch&gt;-linux.so,
199 vgpreload_helgrind-&lt;Arch&gt;-linux.so,
200 vgpreload_massif-&lt;Arch&gt;-linux.so, and
201 vgpreload_memcheck-&lt;Arch&gt;-linux.so, where
202 &lt;Arch&gt; is x86 or amd64
203 </seg>
204 <seg>
205 /usr/lib/valgrind,
206 /usr/include/valgrind, and
207 /usr/share/doc/valgrind-&valgrind-version;
208 </seg>
209 </seglistitem>
210 </segmentedlist>
211
212 <variablelist>
213 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
214 <?dbfo list-presentation="list"?>
215 <?dbhtml list-presentation="table"?>
216
217 <varlistentry id="valgrind-prog">
218 <term><command>valgrind</command></term>
219 <listitem>
220 <para>
221 is a program for debugging and profiling Linux executables.
222 </para>
223 <indexterm zone="valgrind valgrind-prog">
224 <primary sortas="b-valgrind">valgrind</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 <varlistentry id="callgrind_annotate">
230 <term><command>callgrind_annotate</command></term>
231 <listitem>
232 <para>
233 takes an output file produced by the
234 <application>Valgrind</application> tool Callgrind and prints the
235 information in an easy-to-read form.
236 </para>
237 <indexterm zone="valgrind callgrind_annotate">
238 <primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="callgrind_control">
244 <term><command>callgrind_control</command></term>
245 <listitem>
246 <para>
247 controls programs being run by the <application>Valgrind</application>
248 tool Callgrind.
249 </para>
250 <indexterm zone="valgrind callgrind_control">
251 <primary sortas="b-callgrind_control">callgrind_control</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry id="cg_annotate">
257 <term><command>cg_annotate</command></term>
258 <listitem>
259 <para>
260 is a post-processing tool for the <application>Valgrind</application>
261 tool Cachegrind.
262 </para>
263 <indexterm zone="valgrind cg_annotate">
264 <primary sortas="b-cg_annotate">cg_annotate</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="cg_diff">
270 <term><command>cg_diff</command></term>
271 <listitem>
272 <para>
273 compares two Cachegrind output files.
274 </para>
275 <indexterm zone="valgrind cg_diff">
276 <primary sortas="b-cg_diff">cg_diff</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="cg_merge">
282 <term><command>cg_merge</command></term>
283 <listitem>
284 <para>
285 merges multiple Cachegrind output files into one.
286 </para>
287 <indexterm zone="valgrind cg_merge">
288 <primary sortas="b-cg_merge">cg_merge</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="ms_print">
294 <term><command>ms_print</command></term>
295 <listitem>
296 <para>
297 takes an output file produced by the <application>Valgrind</application>
298 tool Massif and prints the information in an easy-to-read form.
299 </para>
300 <indexterm zone="valgrind ms_print">
301 <primary sortas="b-ms_print">ms_print</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="valgrind-di-server">
307 <term><command>valgrind-di-server</command></term>
308 <listitem>
309 <para>
310 is a server that reads debuginfo from objects stored on a
311 different machine.
312 </para>
313 <indexterm zone="valgrind valgrind-di-server">
314 <primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318
319 <varlistentry id="valgrind-listener">
320 <term><command>valgrind-listener</command></term>
321 <listitem>
322 <para>
323 listens on a socket for Valgrind commentary.
324 </para>
325 <indexterm zone="valgrind valgrind-listener">
326 <primary sortas="b-valgrind-listener">valgrind-listener</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 <varlistentry id="vgdb">
332 <term><command>vgdb</command></term>
333 <listitem>
334 <para>
335 is an intermediary between Valgrind and GDB or a shell.
336 </para>
337 <indexterm zone="valgrind vgdb">
338 <primary sortas="b-vgdb">vgdb</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
343 </variablelist>
344
345 </sect2>
346
347</sect1>
Note: See TracBrowser for help on using the repository browser.