1 <?xml version="1.0"?> <!-- -*- sgml -*- -->
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
4 [ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
7 <chapter id="design-impl"
8 xreflabel="The design and implementation of Valgrind">
10 <title>The Design and Implementation of Valgrind</title>
13 <para>A number of academic publications nicely describe many aspects
14 of Valgrind's design and implementation. Online copies of all of
15 them, and others, are available on the <ulink url="&vg-pubs-url;">Valgrind
16 publications page</ulink>.</para>
18 <para>The following paper gives a good overview of Valgrind, and explains
19 how it differs from other dynamic binary instrumentation frameworks such as
20 Pin and DynamoRIO.</para>
25 <command>Valgrind: A Framework for Heavyweight Dynamic Binary
26 Instrumentation. Nicholas Nethercote and Julian Seward. Proceedings
27 of ACM SIGPLAN 2007 Conference on Programming Language Design and
28 Implementation (PLDI 2007), San Diego, California, USA, June
35 <para>The following two papers together give a comprehensive description of
36 how most of Memcheck works. The first paper describes in detail how
37 Memcheck's undefined value error detection (a.k.a. V bits) works. The
38 second paper describes in detail how Memcheck's shadow memory is
39 implemented, and compares it to other alternative approaches.
44 <para><command>Using Valgrind to detect undefined value errors with
45 bit-precision. Julian Seward and Nicholas Nethercote. Proceedings
46 of the USENIX'05 Annual Technical Conference, Anaheim, California,
47 USA, April 2005.</command>
50 <para><command>How to Shadow Every Byte of Memory Used by a Program.
51 Nicholas Nethercote and Julian Seward. Proceedings of the Third
52 International ACM SIGPLAN/SIGOPS Conference on Virtual Execution
53 Environments (VEE 2007), San Diego, California, USA, June
60 <para>The following paper describes Callgrind.</para>
64 <para><command>A Tool Suite for Simulation Based Analysis of Memory Access
65 Behavior. Josef Weidendorfer, Markus Kowarschik and Carsten
66 Trinitis. Proceedings of the 4th International Conference on
67 Computational Science (ICCS 2004), Krakow, Poland, June 2004.</command>
72 <para>The following dissertation describes Valgrind in some detail
73 (many of these details are now out-of-date) as well as Cachegrind,
74 Annelid and Redux. It also covers some underlying theory about
75 dynamic binary analysis in general and what all these tools have in
80 <para><command>Dynamic Binary Analysis and Instrumentation. Nicholas
81 Nethercote.</command> PhD Dissertation, University of Cambridge, November