364 Commits

Author SHA1 Message Date
Mark Wielaard
8d3c8034b8 -> 3.19.0 final. 2022-04-11 15:29:18 +02:00
Mark Wielaard
5aca524f5a Set version once in configure.ac, use in valgrind.h andvg-entities.xml
Currently the version is updated in 3 places, configure.ac,
include/valgrind.h and docs/xml/vg-entities.xml. This goes wrong from
time to time. So only define the version (and release date) once in
configure.ac and update both other places at configure time.
2021-10-17 23:14:50 +02:00
Mark Wielaard
20abe9e148 -> 3.18.0.RC1 2021-10-12 23:57:00 +02:00
Paul Floyd
a6096335c3 FreeBSD support, patch 8a
docs directory
2021-10-07 08:30:33 +02:00
Julian Seward
997b3b5b96 -> 3.17.0 final. 2021-03-19 09:50:54 +01:00
Julian Seward
d695fb68e5 -> 3.17.0.RC1 2021-03-13 20:52:01 +01:00
Aaron Merey
fd4e3fb0ff PR432215 Add debuginfod functionality
debuginfod is an HTTP server for distributing ELF/DWARF debugging
information.  When a debuginfo file cannot be found locally, Valgrind
is able to query debuginfod servers for the file using its build-id.

readelf.c: Add debuginfod_find_debug_file(). Spawns a child process to
exec `debuginfod-find` in order to query servers for the debuginfo
file. Also add helper debuginfod_find_path().

pub_core_pathscan.h: Moved from priv_initimg_pathscan.h in order to use
VG_(find_executable)() in readelf.c.

docs: Add information regarding debuginfod to valgrind.1

memcheck/tests/linux: Add new test debuginfod-check.

tests/vg_regtest.in: Clear $DEBUGINFOD_URLS before running any tests.

https://bugs.kde.org/show_bug.cgi?id=432215
2021-02-26 01:38:42 +01:00
Mark Wielaard
c9781cc97e PR140939 --track-fds reports leakage of stdout/in/err and doesn't respect -q
Make --track-fds=yes not report on file descriptors 0, 1, and 2 (stdin,
stdout, and stderr) by default. Add a new option --track-fds=all that does
report on the std file descriptors still being open. Update testsuite and
documentation.

Original patch by Peter Kelly <pmk@cs.adelaide.edu.au>
Updated by Daniel Fahlgren <daniel@fahlgren.se>

https://bugs.kde.org/show_bug.cgi?id=140939
2021-02-10 19:37:08 +01:00
Philippe Waroquiers
c6bb6c8954 Document format of suppression files comment lines and blank lines.
Seems this was not documented.
2020-08-15 16:45:54 +02:00
Mark Wielaard
a489f40f78 docs: Make sure all elements that need it have an id tag.
When generating HTML it is useful if every element that can be referenced
has a stable id. If it doesn't a random one is generated which makes it
harder to link to parts of the manual on the website. It also generates
spurious diffs. Explicitly add an id tag for the sect2 and sect3 elements
in dh-manual, a unique id for each legalnotice element and for each
FAQ question and answer.
2020-06-09 11:23:46 +02:00
Julian Seward
5902175ae9 -> 3.16.0 final
(cherry picked from commit 108b4a0880bc04f9db6133f79a8e4a98dcfc0cd0)
2020-06-08 19:56:55 +02:00
Julian Seward
940ec1ca69 -> 3.16.0.RC1 2020-05-18 18:50:27 +02:00
Mark Wielaard
21ceb09d5d Set refmiscinfo class to version in all manpages.
Otherwise xsltproc will complain while producing the manpage that
it doesn't know how to interpret the release string.
2020-05-14 19:11:26 +02:00
Mark Wielaard
de93a35139 Make Execution Trees references available in both manual and man pages.
Both the manual and the man pages reference xtrees. Create some shared
entities so both can reference the section.
2020-05-14 17:50:52 +02:00
Mark Wielaard
28b8d8b5a1 Turn manpages-index.xml into a "real" book, so it can be validated.
manpages-index.xml is just to easily get at each individual man page
with xsltproc. It wasn't a complete docbookx xml file. Now that it is
we can validate it with xmllint. It doesn't fully validate, but we
are close.
2020-05-14 16:10:27 +02:00
Mark Wielaard
555ddc4753 Use DTD DocBook XML V4.5 everywhere.
This makes the rule for xmllint easier since it doesn't need to
override the DTD to validate against. It also helps with other tools
tryinf to process the docbookx xml files.
2020-05-14 15:12:02 +02:00
Mark Wielaard
47660cc83d manual-core-adv.xml: listitems contain paras, not plain CDATA. 2020-05-13 15:46:16 +02:00
Mark Wielaard
014bcea452 manual-core.xml: Fix various xmllint issues.
Wrap bare CDATA text in a para and make sure that all listitems contain
paras.
2020-05-13 15:37:13 +02:00
Mark Wielaard
9e87b109a0 valgrind-manpage.xml: arg cannot contain a program, use replaceable. 2020-05-13 15:27:57 +02:00
Mark Wielaard
14c818557c Make manual-writing-tools.xml xmllint clean. 2020-05-13 14:08:19 +02:00
Mark Wielaard
ec37306c12 Make FAQ.xml xmllint clean. 2020-05-13 14:03:27 +02:00
Mark Wielaard
d772e25995 Remove SGcheck from documentation.
Since the SGcheck tool was removed for 3.16.0, also remove it from the
manual intro and core sections and the xml-output-protocol4 description.
2020-05-02 16:21:58 +02:00
Julian Seward
40187fcd61 Remove the exp-sgcheck tool.
It only ever worked on x86 and amd64, and even on those it had a high false
positive rate and was slow.  Everything it does, ASan can do faster, better,
and on more architectures.  So there's no reason to keep this tool any more.
2020-04-17 19:25:32 +02:00
Philippe Waroquiers
fe9c80daa2 Add option -T to vgdb to output timestamps in vgdb information/error messages
Also cleanup some trailink blanks.
2020-02-08 13:01:24 +01:00
Julian Seward
56e04256a7 Rationalise --vex-guest* flags in the new IRSB construction framework
* removes --vex-guest-chase-cond=no|yes.  This was never used in practice.

* rename --vex-guest-chase-thresh=<0..99> to --vex-guest-chase=no|yes.  In
  otherwords, downgrade it from a numeric flag to a boolean one, that can
  simply disable all chasing if required.  (Some tools, notably Callgrind,
  force-disable block chasing, so this functionality at least needs to be
  retained).
2020-01-02 06:42:21 +01:00
Philippe Waroquiers
3a803036f7 Allow the user to change a set of command line options during execution.
This patch changes the option parsing framework to allow a set of
core or tool (currently only memcheck) options to be changed dynamically.

Here is a summary of the new functionality (extracted from NEWS):
* It is now possible to dynamically change the value of many command
  line options while your program (or its children) are running under
  Valgrind.
  To have the list of dynamically changeable options, run
     valgrind --help-dyn-options
  You can change the options from the shell by using vgdb to launch
  the monitor command "v.clo <clo option>...".
  The same monitor command can be used from a gdb connected
  to the valgrind gdbserver.
  Your program can also change the dynamically changeable options using
  the client request VALGRIND_CLO_CHANGE(option).

Here is a brief description of the code changes.
* the command line options parsing macros are now checking a 'parsing' mode
  to decide if the given option must be handled or not.
  (more about the parsing mode below).

* the 'main' command option parsing code has been split in a function
  'process_option' that can be called now by:
     - early_process_cmd_line_options
        (looping over args, calling process_option in mode "Early")
     - main_process_cmd_line_options
        (looping over args, calling process_option in mode "Processing")
     - the new function VG_(process_dynamic_option) called from
       gdbserver or from VALGRIND_CLO_CHANGE (calling
        process_option in mode "Dynamic" or "Help")

* So, now, during startup, process_option is called twice for each arg:
   - once during Early phase
   - once during normal Processing
  Then process_option can then be called again during execution.

So, the parsing mode is defined so that the option parsing code
behaves differently (e.g. allows or not to handle the option)
depending on the mode.

// Command line option parsing happens in the following modes:
//   cloE : Early processing, used by coregrind m_main.c to parse the
//      command line  options that must be handled early on.
//   cloP : Processing,  used by coregrind and tools during startup, when
//      doing command line options Processing.
//   clodD : Dynamic, used to dynamically change options after startup.
//      A subset of the command line options can be changed dynamically
//      after startup.
//   cloH : Help, special mode to produce the list of dynamically changeable
//      options for --help-dyn-options.
typedef
   enum {
      cloE = 1,
      cloP = 2,
      cloD = 4,
      cloH = 8
   } Clo_Mode;

The option parsing macros in pub_tool_options.h have now all a new variant
*_CLOM with the mode(s) in which the given option is accepted.
The old variant is kept and calls the new variant with mode cloP.
The function VG_(check_clom) in the macro compares the current mode
with the modes allowed for the option, and returns True if qq_arg
should be further processed.

For example:

// String argument, eg. --foo=yes or --foo=no
   (VG_(check_clom)                                                     \
    (qq_mode, qq_arg, qq_option,                                        \
     VG_STREQN(VG_(strlen)(qq_option)+1, qq_arg, qq_option"=")) &&      \
    ({const HChar* val = &(qq_arg)[ VG_(strlen)(qq_option)+1 ];         \
      if      VG_STREQ(val, "yes") (qq_var) = True;                     \
      else if VG_STREQ(val, "no")  (qq_var) = False;                    \
      else VG_(fmsg_bad_option)(qq_arg, "Invalid boolean value '%s'"    \
                                " (should be 'yes' or 'no')\n", val);   \
      True; }))

   VG_BOOL_CLOM(cloP, qq_arg, qq_option, qq_var)

To make an option dynamically excutable, it is typically enough to replace
    VG_BOOL_CLO(...)
by
    VG_BOOL_CLOM(cloPD, ...)

For example:
-   else if VG_BOOL_CLO(arg, "--show-possibly-lost", tmp_show) {
+   else if VG_BOOL_CLOM(cloPD, arg, "--show-possibly-lost", tmp_show) {

cloPD means the option value is set/changed during the main command
Processing (P) and Dynamically during execution (D).

Note that the 'body/further processing' of a command is only executed when
the option is recognised and the current parsing mode is ok for this option.
2019-08-31 14:41:10 +02:00
Andrew Gaul
75a36cb13b Update references to non-existent configure.in 2019-07-14 13:55:20 +02:00
Philippe Waroquiers
a711ce5735 Have gdbserver accepts the syntax address[length]
The syntax address[length] can be used in all the gdbserer monitor
commands that need an address and optional length argument.

This commit also fixes an error message, and removes trailing whitespaces
in m_gdbserver.c
2019-05-16 21:34:37 +02:00
Julian Seward
ce94d674de Fix broken links in the Massif manual. 2019-04-08 09:29:03 +02:00
Julian Seward
832ff31c81 Misc doc updates for upcoming 3.15.0 release. 2019-04-08 08:08:19 +02:00
Mark Wielaard
19906dc4d9 Add (minimal) manual page for valgrind-di-server.
This adds a minimal man page for the experimental valgrind-di-server
so that we have manual pages for all (auxiliary) programs we install.
2019-04-07 18:29:02 +02:00
Nicholas Nethercote
441bfc5f51 Overhaul DHAT.
This commit thoroughly overhauls DHAT, moving it out of the
"experimental" ghetto. It makes moderate changes to DHAT itself,
including dumping profiling data to a JSON format output file. It also
implements a new data viewer (as a web app, in dhat/dh_view.html).

The main benefits over the old DHAT are as follows.

- The separation of data collection and presentation means you can run a
  program once under DHAT and then sort the data in various ways. Also,
  full data is in the output file, and the viewer chooses what to omit.

- The data can be sorted in more ways than previously. Some of these
  sorts involve useful filters such as "short-lived" and "zero reads or
  zero writes".

- The tree structure view avoids the need to choose stack trace depth.
  This avoids both the problem of not enough depth (when records that
  should be distinct are combined, and may not contain enough
  information to be actionable) and the problem of too much depth (when
  records that should be combined are separated, making them seem less
  important than they really are).

- Byte and block measures are shown with a percentage relative to the
  global count, which helps gauge relative significance of different
  parts of the profile.

- Byte and blocks measures are also shown with an allocation rate
  (bytes and blocks per million instructions), which enables comparisons
  across multiple profiles, even if those profiles represent different
  workloads.

- Both global and per-node measurements are taken at the global heap
  peak ("At t-gmax"), which gives Massif-like insight into the point of
  peak memory use.

- The final/liftimes stats are a bit more useful than the old deaths
  stats. (E.g. the old deaths stats didn't take into account lifetimes
  of unfreed blocks.)

- The handling of realloc() has changed. The sequence `p = malloc(100);
  realloc(p, 200);` now increases the total block count by 2 and the
  total byte count by 300. Previously it increased them by 1 and 200.
  The new handling is a more operational view that better reflects the
  effect of allocations on performance. It makes a significant
  difference in the results, giving paths involving reallocation (e.g.
  repeated pushing to a growing vector) more prominence.

Other things of note:

- There is now testing, both regression tests that run within the
  standard test suite, and viewer-specific tests that cannot run within
  the standard test suite. The latter are run by loading
  dh_view.html?test=1 in a web browser.

- The commit puts all tool lists in Makefiles (and similar files) in the
  following consistent order: memcheck, cachegrind, callgrind, helgrind,
  drd, massif, dhat, lackey, none; exp-sgcheck, exp-bbv.

- A lot of fields in dh_main.c have been given more descriptive names.
  Those names now match those used in dh_view.js.
2019-02-01 14:54:34 +11:00
Philippe Waroquiers
9efc7e80f2 Document the new options --show-error-list and -s 2018-12-28 19:33:06 +01:00
Philippe Waroquiers
66b5a4e9c4 Fix 399301 - Use inlined frames in Massif XTree output.
Author: Nicholas Nethercote <nnethercote@mozilla.com>

Use inlined frames in Massif XTree output.

    This makes Massif's output much easier to follow.

    The commit also removes a -1 used on all Massif stack frame addresses.
    There was a big comment questioning the presence of that -1, and with it
    gone the addresses now match those produced by DHAT.
2018-10-27 20:28:59 +02:00
Philippe Waroquiers
4c80082c36 Prepare for the next 3.15 release
* Create the 3.15 section in the NEWS file
  (the idea is that this section is maintained during the development,
   i.e. document user visible changes and/or the fixed bugs, as part of
   the commit).

* start the fixed bug list with 399322  Improve callgrind_annotate output

* update vg-entities.xml for 3.15 next release.
2018-10-20 11:37:26 +02:00
Julian Seward
3a3000290b --> 3.14.0 final 2018-10-09 13:52:05 +02:00
Julian Seward
7669f536ee --> 3.14.0.RC1 2018-09-30 10:21:27 +02:00
Mark Wielaard
5d41dadeb3 Update vg-entities.xml and valgrind.h for next version number. 2018-09-14 23:12:45 +02:00
Philippe Waroquiers
c007cf5db9 Mention --keep-debuginfo=yes in the FAQ for unloaded shared objects. 2018-09-13 21:12:56 +02:00
Ivo Raisr
410d736a99 Ability to add suppressions based on source file name and line number.
Fixes BZ#390471.
Patch based on work by: Jeff Frontz <jeff.frontz@gmail.com> and Joseph M Link.
2018-06-26 06:36:12 +02:00
Philippe Waroquiers
26e21fe911 Point the kcachegrind link to the up to date page
http://kcachegrind.sourceforge.net/cgi-bin/show.cgi/KcacheGrindIndex
page indicates to rather go to
https://kcachegrind.github.io/html/Home.html
so update the doc accordingly.
2018-05-16 23:43:15 +02:00
Ivo Raisr
bd077baa71 Add a simple progress-reporting facility.
Fixes BZ#384633.
Patch by: Julian Seward <jseward@acm.org>
2018-01-20 19:56:02 +00:00
Julian Seward
cceed053ce Bug 79362 - Debug info is lost for .so files when they are dlclose'd. Majorly reworked by Philippe Waroquiers. 2018-01-11 19:40:12 +01:00
Ivo Raisr
c46053cc38 Optionally exit on the first error with --exit-on-first-error=<yes|no>.
Fixes BZ#385939.
Slightly modified patch by: Fauchet Gauthier <gauthier.fauchet@free.fr>
2017-11-04 14:31:22 +01:00
Philippe Waroquiers
477ef25e67 Small improvement to user manual: capitalise another occurence of memcheck
(yes, I am experimenting with valgrind git repository :)
2017-08-15 23:37:15 +02:00
Philippe Waroquiers
3e35ebc464 Small improvement to user manual: capitalise one occurence of memcheck 2017-08-15 23:06:28 +02:00
Ivo Raisr
830d59718a Change Subversion to GIT in various places 2017-08-14 15:27:40 +02:00
Ivo Raisr
63032324b0 Change SVN to GIT in various places and simple scripts. 2017-08-14 15:27:27 +02:00
Philippe Waroquiers
dc0fb705e9 Various minor fixes and correction in user manual and monitor command help
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16466
2017-08-01 20:21:38 +00:00
Julian Seward
fdd319ac66 Update version numbers for 3.13.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16431
2017-06-01 15:44:29 +00:00