From: Nicholas Nethercote Date: Wed, 29 Jul 2009 02:36:21 +0000 (+0000) Subject: Started overhauling the documentation: X-Git-Tag: svn/VALGRIND_3_5_0~198 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78b2e5c83e0ecd4001611464b08ba2b62efcfce8;p=thirdparty%2Fvalgrind.git Started overhauling the documentation: - There were detailed descriptions of all the tools in the Quick Start Guide, the Manual introduction, and the start of each tool chapter. To avoid duplication/overlap, I removed these altogether from the Quick Start Guide, and shortened them in the intro. - Improved the description of what errors Memcheck can find. - Made all tool chapters start with "Overview" section, for consistency. - Made the "run with --tool=XXX" bit consistent in each tool chapter. - Made all tool chapter titles match the description given when running them. - Added BBV to the User Manual intro. - Generally clarified, updated, and future-proofed various bits of text in the Quick Start Guide and User Manual introduction. Also: - Changed Nulgrind's start-up description to "the minimal Valgrind tool". - Fixed some punctuation in the usage message. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10652 --- diff --git a/cachegrind/docs/cg-manual.xml b/cachegrind/docs/cg-manual.xml index 512eeb409b..1b37a50ea3 100644 --- a/cachegrind/docs/cg-manual.xml +++ b/cachegrind/docs/cg-manual.xml @@ -4,27 +4,22 @@ [ %vg-entities; ]> - -Cachegrind: a cache and branch profiler - - -Cache and branch profiling + +Cachegrind: a cache and branch-prediction profiler To use this tool, you must specify --tool=cachegrind on the Valgrind command line. -Cachegrind is a tool for finding places where programs -interact badly with typical modern superscalar processors -and run slowly as a result. -In particular, it will do a cache simulation of your program, -and optionally a branch-predictor simulation, and can -then annotate your source line-by-line with the number of cache -misses and branch mispredictions. The following statistics are -collected: + +Overview + +Cachegrind simulates how your program interacts with a machine's cache +hierarchy and (optionally) branch predictor. It gathers the following +statistics: - L1 instruction cache reads and misses; + L1 instruction cache reads and read misses; L1 data cache reads and read misses, writes and write @@ -44,24 +39,28 @@ collected: +These statistics are presented for the entire program and for each +function in the program. You can also annotate each line of source code in +the program with the counts that were caused directly by it. + On a modern machine, an L1 miss will typically cost around 10 cycles, an L2 miss can cost as much as 200 cycles, and a mispredicted branch costs in the region of 10 to 30 cycles. Detailed cache and branch profiling can be very useful -for improving the performance of your program. +for understanding how your program interacts with the machine and thus how +to make it faster. Also, since one instruction cache read is performed per instruction executed, you can find out how many instructions are -executed per line, which can be useful for traditional profiling -and test coverage. +executed per line, which can be useful for traditional profiling. Branch profiling is not enabled by default. To use it, you must additionally specify --branch-sim=yes on the command line. - -Overview + +Basics First off, as for normal Valgrind use, you probably want to compile with debugging info (the @@ -169,7 +168,7 @@ follows: The cache configuration simulated (cache size, associativity and line size) is determined automagically using -the CPUID instruction. If you have an old machine that (a) +the x86 CPUID instruction. If you have an machine that (a) doesn't support the CPUID instruction, or (b) supports it in an early incarnation that doesn't give any cache information, then Cachegrind will fall back to using a default configuration (that diff --git a/callgrind/docs/cl-manual.xml b/callgrind/docs/cl-manual.xml index e94d4e953e..2f3d9f65d7 100644 --- a/callgrind/docs/cl-manual.xml +++ b/callgrind/docs/cl-manual.xml @@ -4,9 +4,13 @@ [ %cl-entities; ]> -Callgrind: a call graph profiler +Callgrind: a call-graph generating cache profiler +To use this tool, you must specify +--tool=callgrind on the +Valgrind command line. + Overview diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 4fd5311b4b..b5c8f50ef5 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -212,8 +212,8 @@ static void usage_NORETURN ( Bool debug_help ) " Extra options read from ~/.valgrindrc, $VALGRIND_OPTS, ./.valgrindrc\n" "\n" " %s is %s\n" -" Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al\n" -" LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP\n" +" Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al.\n" +" LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP.\n" "\n" " Bug reports, feedback, admiration, abuse, etc, to: %s.\n" "\n"; diff --git a/docs/xml/manual-intro.xml b/docs/xml/manual-intro.xml index db64191d23..569d05e676 100644 --- a/docs/xml/manual-intro.xml +++ b/docs/xml/manual-intro.xml @@ -1,6 +1,7 @@ + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" +[ %vg-entities; ]> Introduction @@ -8,163 +9,81 @@ An Overview of Valgrind -Valgrind is a suite of simulation-based debugging and profiling -tools for programs running on Linux (x86, amd64, ppc32 and ppc64). -The system consists of a core, which provides a synthetic CPU in -software, and a set of tools, each of which performs some kind of -debugging, profiling, or similar task. The architecture is modular, -so that new tools can be created easily and without disturbing the -existing structure. +Valgrind is an instrumentation framework for building dynamic analysis +tools. It comes with a set of tools each of which performs some kind of +debugging, profiling, or similar task that helps you improve your programs. +Valgrind's architecture is modular, so new tools can be created easily +and without disturbing the existing structure. -A number of useful tools are supplied as standard. In -summary, these are: +A number of useful tools are supplied as standard. - Memcheck detects memory-management problems - in programs. All reads and writes of memory are checked, and - calls to malloc/new/free/delete are intercepted. As a result, - Memcheck can detect the following problems: - - - - Use of uninitialised memory - - - Reading/writing memory after it has been - free'd - - - Reading/writing off the end of malloc'd - blocks - - - Reading/writing inappropriate areas on the - stack - - - Memory leaks -- where pointers to malloc'd - blocks are lost forever - - - Mismatched use of malloc/new/new [] vs - free/delete/delete [] - - - Overlapping src and - dst pointers in - memcpy() and related - functions - - - Problems like these can be difficult to find by other means, - often remaining undetected for long periods, then causing occasional, - difficult-to-diagnose crashes. - + Memcheck is a memory error detector. It helps + you make your programs, particularly those written in C and C++, more + correct. + - - Cachegrind is a cache profiler. It - performs detailed simulation of the I1, D1 and L2 caches in your CPU - and so can accurately pinpoint the sources of cache misses in your - code. It will show the number of cache misses, - memory references and instructions accruing to each line of source - code, with per-function, per-module and whole-program summaries. If - you ask really nicely it will even show counts for each individual - machine instruction. - - On x86 and and64, Cachegrind auto-detects your machine's cache - configuration using the CPUID - instruction, and so needs no further configuration info, in most - cases. - - - - Callgrind is a profiler similar in - concept to Cachegrind, but which also tracks caller-callee - relationships. By doing so it is able to show how instruction, - memory reference and cache miss costs flow between callers and - callees. Callgrind collects a large amount of data which is best - navigated using Josef Weidendorfer's amazing KCachegrind - visualisation tool (http://kcachegrind.sourceforge.net). - KCachegrind is a KDE application which presents - these profiling results in a - graphical and easy-to-understand form. - - - - Helgrind detects synchronisation errors - in programs that use the POSIX pthreads threading primitives. It - detects the following three classes of errors: - - - - Misuses of the POSIX pthreads API. - - - Potential deadlocks arising from lock ordering - problems. - - - Data races -- accessing memory without adequate locking. - - - - Problems like these often result in unreproducible, - timing-dependent crashes, deadlocks and other misbehaviour, and - can be difficult to find by other means. - - - - DRD is similar to Helgrind, but uses a - different analysis technique and so may find different problems. - - - - - Massif is a heap profiler. - It measures how much heap memory programs use. In particular, - it can give you information about heap blocks, heap - administration overheads, and stack sizes. - - Heap profiling can help you reduce the amount of - memory your program uses. On modern machines with virtual - memory, this reduces the chances that your program will run out - of memory, and may make it faster by reducing the amount of - paging needed. - - - - Ptrcheck is an experimental pointer checking - tool. Its functionality overlaps somewhat with Memcheck's, but it can - find some problems that Memcheck would miss. - + + Cachegrind is a cache and branch-prediction + profiler. It can help you make your programs run faster. + + + + Callgrind is a call-graph generating cache + profiler. It has some overlap with Cachegrind, but also gathers some + information that Cachegrind does not. + + + + Helgrind is a thread error detector. + It can help you make your multi-threaded programs more correct. + + + + + DRD is also a thread error detector. It is + similar to Helgrind but uses different analysis techniques and so may + find different problems. + + + Massif is a heap profiler. It can help you + make your programs use less memory. + + + + Ptrcheck is an experimental heap, stack and + global array overrun detector. Its functionality overlaps somewhat + with Memcheck's, but it can find some problems that Memcheck would + miss. + + + + BBV is an experimental SimPoint basic block + vector generator. It is useful to people doing computer architecture + research and development. + - -A couple of minor tools (Lackey and -Nulgrind) are also supplied. These aren't -particularly useful -- they exist to illustrate how to create simple -tools and to help the valgrind developers in various ways. Nulgrind is -the null tool -- it adds no instrumentation. Lackey is a simple example -tool which counts instructions, memory accesses, and the number of -integer and floating point operations your program does. +There are also a couple of minor tools that aren't useful to +most users: Lackey is an example tool that illustrates +some instrumentation basics; and Nulgrind is the minimal +Valgrind tool that does no analysis or instrumentation, and is only useful +for testing purposes. Valgrind is closely tied to details of the CPU and operating system, and to a lesser extent, the compiler and basic C libraries. -Nonetheless, as of version 3.3.0 it supports several platforms: -x86/Linux (mature), amd64/Linux (maturing), ppc32/Linux and -ppc64/Linux (less mature but work well). There is also experimental -support for ppc32/AIX5 and ppc64/AIX5 (AIX 5.2 and 5.3 only). -Valgrind uses the standard Unix +Nonetheless, it supports a number of widely-used platforms, listed in full +at &vg-url;. + +Valgrind is built via the standard Unix ./configure, make, make -install mechanism, and we have attempted to ensure that -it works on machines with Linux kernel 2.4.X or 2.6.X and glibc -2.2.X to 2.7.X. +install process; full details are given in the +README file in the distribution. Valgrind is licensed under the , version 2. The valgrind/*.h headers @@ -182,7 +101,8 @@ Inc. contributions are licensed as "GPLv2, or (at your option) any later version." This is so as to allow the possibility of easily upgrading the license to GPLv3 in future. If you want to modify code in the VEX -subdirectory, please also see VEX/HACKING.README. +subdirectory, please also see the file VEX/HACKING.README in the +distribution. @@ -191,11 +111,8 @@ subdirectory, please also see VEX/HACKING.README. How to navigate this manual -The Valgrind distribution consists of the Valgrind core, upon -which are built Valgrind tools. The tools do different kinds of debugging -and profiling. This manual is structured similarly. - -First, we describe the Valgrind core, how to use it, and the flags +This manual's structure reflects the structure of Valgrind itself. +First, we describe the Valgrind core, how to use it, and the flags it supports. Then, each tool has its own chapter in this manual. You only need to read the documentation for the core and for the tool(s) you actually use, although you may find it helpful to be at least a little @@ -209,9 +126,8 @@ there is no central place describing all the flags that are accepted -- you have to read the flags documentation both for and for the tool you want to use. -The manual is quite big and complex. If you are looking for a -quick getting-started guide, have a look at -. +The manual is quite big and complex. If you want to start using +Valgrind more quickly, read . diff --git a/docs/xml/manual-writing-tools.xml b/docs/xml/manual-writing-tools.xml index fd386d8a2b..789fb2dd9e 100644 --- a/docs/xml/manual-writing-tools.xml +++ b/docs/xml/manual-writing-tools.xml @@ -11,7 +11,7 @@ Introduction So you want to write a Valgrind tool? Here are some instructions that may -help. They were last updated for Valgrind 3.2.2. +help. Tools diff --git a/docs/xml/quick-start-guide.xml b/docs/xml/quick-start-guide.xml index fbb1cd6d09..465df3d100 100644 --- a/docs/xml/quick-start-guide.xml +++ b/docs/xml/quick-start-guide.xml @@ -26,71 +26,15 @@ Introduction The Valgrind tool suite provides a number of debugging and -profiling tools. The most popular is -Memcheck, a memory checking tool which can detect many common -memory errors such as: +profiling tools that help you make your programs faster and more correct. +The most popular of these tools is called Memcheck. It can detect many +memory-related errors that are common in C and C++ programs and that can +lead to crashes and unpredictable behaviour. - - - Touching memory you shouldn't (eg. overrunning heap block - boundaries, or reading/writing freed memory). - - - Using values before they have been initialized. - - - Incorrect freeing of memory, such as double-freeing heap - blocks. - - - Memory leaks. - - - -Memcheck is only one of the tools in the Valgrind suite. -Other tools you may find useful are: - - - - Cachegrind: a profiling tool which produces detailed data on - cache (miss) and branch (misprediction) events. Statistics are - gathered for the entire program, for each function, and for each - line of code, if you need that level of detail. - - - Callgrind: a profiling tool that shows cost relationships - across function calls, optionally with cache simulation similar to - Cachegrind. Information gathered by Callgrind can be viewed - either with an included command line tool, or by using the - KCachegrind GUI. KCachegrind is not part of the Valgrind suite - -- it is part of the KDE Desktop Environment. - - - Massif: a space profiling tool. It allows you to explore - in detail which parts of your program allocate memory. - - - Helgrind: a debugging tool for threaded programs. Helgrind - looks for various kinds of synchronisation errors in code that uses - the POSIX PThreads API. - - - In addition, there are a number of "experimental" tools in - the codebase. They can be distinguished by the "exp-" prefix on - their names. Experimental tools are not subject to the same - quality control standards that apply to our production-grade tools - (Memcheck, Cachegrind, Callgrind, Massif, Helgrind and DRD). - - - -The rest of this guide discusses only the Memcheck tool. For -full documentation on the other tools, and for Memcheck, see the -Valgrind User Manual. - -What follows is the minimum information you need to start -detecting memory errors in your program with Memcheck. Note that this -guide applies to Valgrind version 3.4.0 and later. Some of the -information is not quite right for earlier versions. +The rest of this guide gives the minimum information you need to start +detecting memory errors in your program with Memcheck. For full +documentation of Memcheck and the other tools, please read the User Manual. + @@ -103,9 +47,9 @@ information so that Memcheck's error messages include exact line numbers. Using -O0 is also a good idea, if you can tolerate the slowdown. With -O1 line numbers in error messages can -be inaccurate, although generally speaking Memchecking code compiled at --O1 works fairly well and is -recommended. Use of +be inaccurate, although generally speaking running Memcheck on code compiled +at -O1 works fairly well. +Use of -O2 and above is not recommended as Memcheck occasionally reports uninitialised-value errors which don't really exist. @@ -137,8 +81,8 @@ memory errors and leaks that it detects. Interpreting Memcheck's output -Here's an example C program with a memory error and a memory -leak. +Here's an example C program, in a file called a.c, with a memory error +and a memory leak. #include <stdlib.h> @@ -237,12 +181,13 @@ categories are: -It can be difficult to track down the root causes of -uninitialised-value errors reported by Memcheck. Try using -the to get extra information. -This makes Memcheck run slower, but the extra information you get -often saves a lot of time figuring out where the uninitialised values -are coming from. +Memcheck also reports uses of uninitialised values, most commonly with +the message "Conditional jump or move depends on uninitialised +value(s)". It can be difficult to determine the root cause of these errors. +Try using the to get extra information. +This makes Memcheck run slower, but the extra information you get often +saves a lot of time figuring out where the uninitialised values are coming +from. If you don't understand an error message, please consult in the @@ -275,8 +220,8 @@ errors. Once you achieve this state, it is much easier to see when changes to the program cause Memcheck to report new errors. Experience from several years of Memcheck use shows that it is possible to make even huge programs run Memcheck-clean. For example, -large parts of KDE 3.5.X, and recent versions of OpenOffice.org -(2.3.0) are Memcheck-clean, or very close to it. +large parts of KDE, OpenOffice.org and Firefox are Memcheck-clean, or very +close to it. diff --git a/drd/docs/drd-manual.xml b/drd/docs/drd-manual.xml index ee49ac7a74..18c1fb9395 100644 --- a/drd/docs/drd-manual.xml +++ b/drd/docs/drd-manual.xml @@ -13,7 +13,7 @@ on the Valgrind command line. -Background +Overview DRD is a Valgrind tool for detecting errors in multithreaded C and C++ diff --git a/exp-bbv/docs/bbv-manual.xml b/exp-bbv/docs/bbv-manual.xml index a699a5f5d5..25d7a467d7 100644 --- a/exp-bbv/docs/bbv-manual.xml +++ b/exp-bbv/docs/bbv-manual.xml @@ -3,14 +3,14 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> - BBV: a Basic Block Vector generation tool + BBV: an experimental basic block vector generation tool To use this tool, you must specify --tool=exp-bbv on the Valgrind command line. - -Basic Block Profiling and SimPoint + +Overview A Basic Blocks Vector (BBV) is a list of all basic blocks entered @@ -20,7 +20,7 @@ command line. - This tool was written to generate basic block vectors + BBV is tool that generates basic block vectors for use with the SimPoint analysis tool (http://www.cse.ucsd.edu/~calder/simpoint/). The SimPoint methodology enables speeding up architectural @@ -39,14 +39,14 @@ command line. In computer architecture research, running a benchmark on a cycle-accurate simulator can cause slowdowns on the order of 1000 times, making it take days, weeks, or even longer to run full - benchmarks. By utilizing SimPoint this can be reduced significantly - while still retaining reasonable accuracy, usually in the 5-10% range. + benchmarks. By utilizing SimPoint this can be reduced significantly, + usually by 90-95%, while still retaining reasonable accuracy. A more complete introduction to how SimPoint works can be found in the paper "Automatically Characterizing Large Scale - Program Behavior" by T. Sherwood, E Perelman, G. Hamerly, and + Program Behavior" by T. Sherwood, E. Perelman, G. Hamerly, and B. Calder. diff --git a/exp-ptrcheck/docs/pc-manual.xml b/exp-ptrcheck/docs/pc-manual.xml index f3d142d81c..3ce5ca0bd3 100644 --- a/exp-ptrcheck/docs/pc-manual.xml +++ b/exp-ptrcheck/docs/pc-manual.xml @@ -5,8 +5,8 @@ - Ptrcheck: an (experimental) pointer checking tool + xreflabel="Ptrcheck: an experimental heap, stack & global array overrun detector"> + Ptrcheck: an experimental heap, stack & global array overrun detector To use this tool, you must specify --tool=exp-ptrcheck on the Valgrind @@ -18,7 +18,7 @@ command line. Overview -Ptrcheck is a Valgrind tool for finding overruns of heap, stack +Ptrcheck is a tool for finding overruns of heap, stack and global arrays. Its functionality overlaps somewhat with Memcheck's, but it is able to catch invalid accesses in a number of cases that Memcheck would miss. A detailed comparison against diff --git a/helgrind/docs/hg-manual.xml b/helgrind/docs/hg-manual.xml index 2a0348fb48..bd7d5650eb 100644 --- a/helgrind/docs/hg-manual.xml +++ b/helgrind/docs/hg-manual.xml @@ -12,8 +12,6 @@ command line. - - Overview @@ -26,14 +24,6 @@ sharing a common address space, thread creation, thread joining, thread exit, mutexes (locks), condition variables (inter-thread event notifications), reader-writer locks, semaphores and barriers. -Helgrind is aware of all these abstractions and tracks their -effects as accurately as it can. Currently it does not correctly -handle pthread spinlocks, although it will not object if you use them. -Adding support for spinlocks would be easy enough if the demand arises. -On x86 and amd64 platforms, it understands and partially handles -implicit locking arising from the use of the LOCK instruction prefix. - - Helgrind can detect three classes of errors, which are discussed in detail in the next three sections: @@ -58,6 +48,19 @@ in detail in the next three sections: +Problems like these often result in unreproducible, +timing-dependent crashes, deadlocks and other misbehaviour, and +can be difficult to find by other means. + +Helgrind is aware of all the pthread abstractions and tracks their +effects as accurately as it can. Currently it does not correctly +handle pthread spinlocks, although it will not object if you use them. +Adding support for spinlocks would be easy enough if the demand arises. +On x86 and amd64 platforms, it understands and partially handles +implicit locking arising from the use of the LOCK instruction prefix. + + + Following those is a section containing hints and tips on how to get the best out of Helgrind. diff --git a/lackey/docs/lk-manual.xml b/lackey/docs/lk-manual.xml index 028035a739..9a10425a6f 100644 --- a/lackey/docs/lk-manual.xml +++ b/lackey/docs/lk-manual.xml @@ -4,7 +4,7 @@ -Lackey: a simple profiler and memory tracer +Lackey: an example tool To use this tool, you must specify --tool=lackey on the Valgrind diff --git a/massif/docs/ms-manual.xml b/massif/docs/ms-manual.xml index 0b98091a58..4fc94593b4 100644 --- a/massif/docs/ms-manual.xml +++ b/massif/docs/ms-manual.xml @@ -7,21 +7,16 @@ Massif: a heap profiler -Please note that this documentation describes Massif version 3.3.0 -and later. Massif was significantly overhauled for 3.3.0; versions 3.2.3 -and earlier presented the profiling information an a quite different manner, -and so this documentation only pertains to the later versions. - To use this tool, you must specify --tool=massif on the Valgrind command line. - -Heap profiling + +Overview Massif is a heap profiler. It measures how much heap memory your program uses. This includes both the useful space, and the extra bytes -allocated for book-keeping purposes and alignment purposes. It can also +allocated for book-keeping and alignment purposes. It can also measure the size of your program's stack(s), although it does not do so by default. diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml index 24c5be0d0f..8014ce4e07 100644 --- a/memcheck/docs/mc-manual.xml +++ b/memcheck/docs/mc-manual.xml @@ -3,55 +3,56 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> - -Memcheck: a heavyweight memory checker + +Memcheck: a memory error detector To use this tool, you may specify on the Valgrind command line. You don't have to, though, since Memcheck is the default tool. - -Kinds of bugs that Memcheck can find + +Overview -Memcheck is Valgrind's heavyweight memory checking tool. All -reads and writes of memory are checked, and calls to -malloc/new/free/delete -are intercepted. As a result, Memcheck can detect the following -problems: +Memcheck is a memory error detector. It can detect the following +problems that are common in C and C++ programs. - Use of uninitialised memory - - - Reading/writing memory after it has been free'd - - - Reading/writing off the end of malloc'd blocks - - - Reading/writing inappropriate areas on the stack + Accessing memory you shouldn't, e.g. overrunning and underrunning + heap blocks, overrunning the top of the stack, and accessing memory after + it has been freed. + - Memory leaks - where pointers to malloc'd blocks are - lost forever + Using undefined values, i.e. values that have not been initialised, + or that have been derived from other undefined values. + - Mismatched use of + Incorrect freeing of heap memory, such as double-freeing heap + blocks, or mismatched use of malloc/new/new[] versus free/delete/delete[] + Overlapping src and dst pointers in - memcpy() and related - functions + memcpy() and related + functions. + + + + Memory leaks. +Problems like these can be difficult to find by other means, +often remaining undetected for long periods, then causing occasional, +difficult-to-diagnose crashes. + diff --git a/none/docs/nl-manual.xml b/none/docs/nl-manual.xml index 2cd06e4658..547f70248b 100644 --- a/none/docs/nl-manual.xml +++ b/none/docs/nl-manual.xml @@ -5,18 +5,26 @@ -Nulgrind: the "null" tool -A tool that does not very much at all +Nulgrind: the minimal Valgrind tool -Nulgrind is the minimal tool for Valgrind. It does no -initialisation or finalisation, and adds no instrumentation to -the program's code. It is mainly of use for Valgrind's -developers for debugging and regression testing. +To use this tool, you must specify +--tool=none on the Valgrind +command line. + + +Overview + +Nulgrind is the simplest possible Valgrind tool. It performs no +instrumentation or analysis of a program, just runs it normally. It is +mainly of use for Valgrind's developers for debugging and regression +testing. Nonetheless you can run programs with Nulgrind. They will run roughly 5 times more slowly than normal, for no useful effect. Note that you need to use the option to run Nulgrind (ie. not ). + + diff --git a/none/nl_main.c b/none/nl_main.c index 0ace001879..cb029bb3e4 100644 --- a/none/nl_main.c +++ b/none/nl_main.c @@ -1,11 +1,11 @@ /*--------------------------------------------------------------------*/ -/*--- Nulgrind: The null tool. nl_main.c ---*/ +/*--- Nulgrind: The minimal Valgrind tool. nl_main.c ---*/ /*--------------------------------------------------------------------*/ /* - This file is part of Nulgrind, the simplest possible Valgrind tool, - which does nothing. + This file is part of Nulgrind, the minimal Valgrind tool, + which does no instrumentation or analysis. Copyright (C) 2002-2009 Nicholas Nethercote njn@valgrind.org @@ -53,7 +53,7 @@ static void nl_pre_clo_init(void) { VG_(details_name) ("Nulgrind"); VG_(details_version) (NULL); - VG_(details_description) ("a binary JIT-compiler"); + VG_(details_description) ("the minimal Valgrind tool"); VG_(details_copyright_author)( "Copyright (C) 2002-2009, and GNU GPL'd, by Nicholas Nethercote."); VG_(details_bug_reports_to) (VG_BUGS_TO); diff --git a/none/tests/cmdline1.stdout.exp b/none/tests/cmdline1.stdout.exp index f7c55642c8..6c9a474212 100644 --- a/none/tests/cmdline1.stdout.exp +++ b/none/tests/cmdline1.stdout.exp @@ -56,8 +56,8 @@ usage: valgrind [options] prog-and-args Extra options read from ~/.valgrindrc, $VALGRIND_OPTS, ./.valgrindrc Nulgrind is Copyright (C) 2002-2009, and GNU GPL'd, by Nicholas Nethercote. - Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al - LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP + Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al. + LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP. Bug reports, feedback, admiration, abuse, etc, to: www.valgrind.org. diff --git a/none/tests/cmdline2.stdout.exp b/none/tests/cmdline2.stdout.exp index 9ebe49ed8f..98dd177ef6 100644 --- a/none/tests/cmdline2.stdout.exp +++ b/none/tests/cmdline2.stdout.exp @@ -101,8 +101,8 @@ usage: valgrind [options] prog-and-args Extra options read from ~/.valgrindrc, $VALGRIND_OPTS, ./.valgrindrc Nulgrind is Copyright (C) 2002-2009, and GNU GPL'd, by Nicholas Nethercote. - Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al - LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP + Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al. + LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP. Bug reports, feedback, admiration, abuse, etc, to: www.valgrind.org. diff --git a/none/tests/filter_stderr b/none/tests/filter_stderr index adb76265ea..80855df7c3 100755 --- a/none/tests/filter_stderr +++ b/none/tests/filter_stderr @@ -5,7 +5,7 @@ dir=`dirname $0` $dir/../../tests/filter_stderr_basic | # Remove "Nulgrind, ..." line and the following copyright line. -sed "/^Nulgrind, a binary JIT-compiler./ , /./ d" | +sed "/^Nulgrind, the minimal Valgrind tool./ , /./ d" | # Anonymise addresses $dir/../../tests/filter_addresses