source: general/prog/valgrind.xml@ 45ab6c7

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

  • Property mode set to 100644
File size: 12.0 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 "afe11b5572c3121a781433b7c0ab741b">
10 <!ENTITY valgrind-size "16 MB">
11 <!ENTITY valgrind-buildsize "629 MB (add 103 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 <date>$Date$</date>
20 </sect1info>
21
22 <title>Valgrind-&valgrind-version;</title>
23
24 <indexterm zone="valgrind">
25 <primary sortas="a-Valgrind">Valgrind</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to Valgrind</title>
30
31 <para>
32 <application>Valgrind</application> is an instrumentation framework for
33 building dynamic analysis tools. There are Valgrind tools that can
34 automatically detect many memory management and threading bugs, and
35 profile programs in detail. Valgrind can also be used to build new
36 tools.
37 </para>
38
39 &lfs101_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&valgrind-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&valgrind-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &valgrind-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &valgrind-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &valgrind-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &valgrind-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75<!-- Not needed with 3.16.0
76 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
77 <itemizedlist spacing="compact">
78 <listitem>
79 <para>
80 Required patch:
81 <ulink url="&patch-root;/valgrind-&valgrind-version;-gcc_10-fixes-1.patch"/>
82 </para>
83 </listitem>
84 </itemizedlist>
85-->
86
87 <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
88
89 <bridgehead renderas="sect4">Optional</bridgehead>
90 <para role="optional">
91 <!-- The below programs are no longer used or looked for. -->
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<!-- Not needed with 3.17.0
122 <para>
123 First, adapt the tests to glibc-2.33:
124 </para>
125
126<screen><userinput remap="pre">sed -i 's/arm64/amd64/' gdbserver_tests/nlcontrolc.vgtest</userinput></screen>
127-->
128
129 <para>
130 Install <application>Valgrind</application> by running the following
131 commands:
132 </para>
133
134<screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &amp;&amp;
135
136./configure --prefix=/usr \
137 --datadir=/usr/share/doc/valgrind-&valgrind-version; &amp;&amp;
138make</userinput></screen>
139
140 <para>
141 To test the results, issue: <command>make regtest</command>. The tests
142 may hang forever if <xref linkend="gdb"/> is not installed. Some tests
143 are known to hang also, depending on the version of glibc. Some tests
144 in the "drd" test suite are known to fail as well. Problematic
145 tests can be disabled by changing the <userinput>prereq:</userinput> line
146 in the corresponding <filename>.vgtest</filename> file to
147 <userinput>prereq: false</userinput>. For example:
148 </para>
149
150<screen><userinput>sed -e 's@prereq:.*@prereq: false@' \
151 -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest</userinput></screen>
152
153 <note>
154 <para>
155 The <application>OpenMP</application> tests are skipped if libgomp
156 has been compiled with <option>--enable-linux-futex</option> (the
157 default). If needed, just recompile the libgomp library from
158 the gcc build tree, passing <option>--disable-linux-futex</option>
159 to configure, storing the library to some place and changing the link
160 from <filename>/usr/lib/libgomp.so.1</filename> to point to the new
161 library.
162 </para>
163 </note>
164
165<!-- Note to maintainer: there is a long thread in ticket #5882 explaining
166 why we do not provide instructions to rebuild the documentation.
167 (still broken with TeXLive 2016) -->
168
169 <para>
170 Now, as the <systemitem class="username">root</systemitem> user:
171 </para>
172
173<screen role="root"><userinput>make install</userinput></screen>
174
175 </sect2>
176
177 <sect2 role="commands">
178 <title>Command Explanations</title>
179
180 <para>
181 <command>sed -i ... docs/Makefile.in </command>: This sed provides for
182 installing the documentation in a versioned directory.
183 </para>
184
185 <para>
186 <option>--enable-lto=yes</option>: This option allows building Valgrind
187 with LTO (link time optimization). This produces a smaller/faster
188 Valgrind (up to 10%), but build time increases to about 5.5 SBU.
189 </para>
190
191 </sect2>
192
193 <sect2 role="content">
194 <title>Contents</title>
195
196 <segmentedlist>
197 <segtitle>Installed Programs</segtitle>
198 <segtitle>Installed Libraries</segtitle>
199 <segtitle>Installed Directories</segtitle>
200
201 <seglistitem>
202 <seg>
203 callgrind_annotate,
204 callgrind_control,
205 cg_annotate,
206 cg_diff,
207 cg_merge,
208 ms_print,
209 valgrind,
210 valgrind-di-server,
211 valgrind-listener, and
212 vgdb
213 </seg>
214 <seg>
215 <!-- Moved to /usr/lib/valgrind in 3.17.0
216 libcoregrind-&lt;Arch&gt;-linux.a,
217 libgcc-sup-&lt;Arch&gt;-linux.a,
218 libreplacemalloc_toolpreload-&lt;Arch&gt;-linux.a,
219 libvex-&lt;Arch&gt;-linux.a,
220 libvexmultiarch-amd64-linux.a,
221 vgpreload_core-&lt;Arch&gt;-linux.so,
222 vgpreload_drd-&lt;Arch&gt;-linux.so,
223 vgpreload_exp-dhat-&lt;Arch&gt;-linux.so,
224 vgpreload_helgrind-&lt;Arch&gt;-linux.so,
225 vgpreload_massif-&lt;Arch&gt;-linux.so, and
226 vgpreload_memcheck-&lt;Arch&gt;-linux.so, where
227 &lt;Arch&gt; is x86 or amd64
228 -->
229 None
230 </seg>
231 <seg>
232 /usr/lib/valgrind,
233 /usr/libexec/valgrind,
234 /usr/include/valgrind, and
235 /usr/share/doc/valgrind-&valgrind-version;
236 </seg>
237 </seglistitem>
238 </segmentedlist>
239
240 <variablelist>
241 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
242 <?dbfo list-presentation="list"?>
243 <?dbhtml list-presentation="table"?>
244
245 <varlistentry id="valgrind-prog">
246 <term><command>valgrind</command></term>
247 <listitem>
248 <para>
249 is a program for debugging and profiling Linux executables
250 </para>
251 <indexterm zone="valgrind valgrind-prog">
252 <primary sortas="b-valgrind">valgrind</primary>
253 </indexterm>
254 </listitem>
255 </varlistentry>
256
257 <varlistentry id="callgrind_annotate">
258 <term><command>callgrind_annotate</command></term>
259 <listitem>
260 <para>
261 takes an output file produced by the
262 <application>Valgrind</application> tool Callgrind and prints the
263 information in an easy-to-read form
264 </para>
265 <indexterm zone="valgrind callgrind_annotate">
266 <primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="callgrind_control">
272 <term><command>callgrind_control</command></term>
273 <listitem>
274 <para>
275 controls programs being run by the <application>Valgrind</application>
276 tool Callgrind
277 </para>
278 <indexterm zone="valgrind callgrind_control">
279 <primary sortas="b-callgrind_control">callgrind_control</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
284 <varlistentry id="cg_annotate">
285 <term><command>cg_annotate</command></term>
286 <listitem>
287 <para>
288 is a post-processing tool for the <application>Valgrind</application>
289 tool Cachegrind
290 </para>
291 <indexterm zone="valgrind cg_annotate">
292 <primary sortas="b-cg_annotate">cg_annotate</primary>
293 </indexterm>
294 </listitem>
295 </varlistentry>
296
297 <varlistentry id="cg_diff">
298 <term><command>cg_diff</command></term>
299 <listitem>
300 <para>
301 compares two Cachegrind output files
302 </para>
303 <indexterm zone="valgrind cg_diff">
304 <primary sortas="b-cg_diff">cg_diff</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="cg_merge">
310 <term><command>cg_merge</command></term>
311 <listitem>
312 <para>
313 merges multiple Cachegrind output files into one
314 </para>
315 <indexterm zone="valgrind cg_merge">
316 <primary sortas="b-cg_merge">cg_merge</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="ms_print">
322 <term><command>ms_print</command></term>
323 <listitem>
324 <para>
325 takes an output file produced by the <application>Valgrind</application>
326 tool Massif and prints the information in an easy-to-read form
327 </para>
328 <indexterm zone="valgrind ms_print">
329 <primary sortas="b-ms_print">ms_print</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="valgrind-di-server">
335 <term><command>valgrind-di-server</command></term>
336 <listitem>
337 <para>
338 is a server that reads debuginfo from objects stored on a
339 different machine
340 </para>
341 <indexterm zone="valgrind valgrind-di-server">
342 <primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry id="valgrind-listener">
348 <term><command>valgrind-listener</command></term>
349 <listitem>
350 <para>
351 listens on a socket for Valgrind commentary
352 </para>
353 <indexterm zone="valgrind valgrind-listener">
354 <primary sortas="b-valgrind-listener">valgrind-listener</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry id="vgdb">
360 <term><command>vgdb</command></term>
361 <listitem>
362 <para>
363 is an intermediary between Valgrind and GDB or a shell
364 </para>
365 <indexterm zone="valgrind vgdb">
366 <primary sortas="b-vgdb">vgdb</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 </variablelist>
372
373 </sect2>
374
375</sect1>
Note: See TracBrowser for help on using the repository browser.