1095 Commits

Author SHA1 Message Date
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
ab85a40053 docs: Always generate UTF-8 encoding 2020-06-09 12:59:40 +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
Mark Wielaard
4facc497bd doc/Makefile.am: Turn valid-manual and valid-manpages into real targets
Make valid-manual and valid-manpages real, separate make targets.
This means they can be run in parallel and they will only be run
once when doing make check, unless one of the manual and manpages
files has been touched.
2020-06-08 15:14:04 +02:00
Julian Seward
940ec1ca69 -> 3.16.0.RC1 2020-05-18 18:50:27 +02:00
Mark Wielaard
a2ef3fcf6a Explicitly set stylesheet to use with xmlto. 2020-05-15 12:30:00 +02:00
Mark Wielaard
5f4a5783aa Move to xmlto with fop for print-docs.
Default to using fop for pdf generation.
pdfxmltex is known to be broken by default.
xmlto can also use pdfxmltex or dblatex if available.
2020-05-15 01:12:44 +02:00
Mark Wielaard
052cc97416 Run xmllint on make check.
Now that we have valid docbookx xml lets try to keep it that way.
If the user has xmllint installed then run it on make check.
2020-05-15 00:44:52 +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
Julian Seward
afe1d87762 Update bug status. 2020-04-17 16:18:37 +02:00
Andreas Arnez
942a48c1db Bug 417281 - s390x: Fix register usage of conditional moves
The s390x register usage callback marks the target register of a
conditional move as HRmWrite only.  It fails to mention the fact that the
target register is also an input to the insn (unless the condition is
"never" or "always").

This was discovered while investigating "grail" failures on s390x and
fixes the majority of them.
2020-03-18 19:28:24 +01:00
Julian Seward
95bde34862 Update bug status. 2020-03-13 14:35:59 +01:00
Julian Seward
6ef04b3818 Update bug status. 2020-03-09 09:08:28 +01: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
Andreas Arnez
e83c28e10c Bug 416301 - s390x: Support "compare and signal" instructions
Add VEX support for the s390x "compare and signal" instructions KEBR,
KDBR, KXBR, KEB, and KDB.  For now, let them behave exactly like their
non-signalling counterparts.  Enhance the bfp-4 test case to cover these
instructions as well.  Update the list of supported instructions in
s390-opcodes.csv.  Add a disclaimer to README.s390, explaining that FP
signalling is not handled accurately on s390x at the moment.
2020-02-06 12:28:19 +01:00
Andreas Arnez
dcceae252a s390x: Fix some typos in s390-opcodes.csv
Some lines in s390-opcodes.csv contain entries that look like this:

    ...,"arch12"implemented",...

They are probably introduced by some cut-and-paste error.  This is fixed.
2020-01-27 16:46:20 +01:00
Julian Seward
2052837a3e Update bug status. 2020-01-26 16:40:40 +01:00
Julian Seward
95a44677c1 Update bug lists. 2020-01-22 09:08:54 +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
Julian Seward
740381f8ac Update following recent bug-fix commits. 2020-01-02 06:34:52 +01:00
Julian Seward
0cab012e62 Complete initial triage pass. 2019-12-28 20:30:39 +01:00
Julian Seward
6bbb1f9579 First pass at creating a list of bugs reported in 3.15.0, that are as yet un-fixed. 2019-12-28 10:41:35 +01:00
Julian Seward
867dc25599 Create docs/internals/3_15_BUGSTATUS.txt, as-yet empty. 2019-12-27 16:22:25 +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
Ilya Leoshkevich
50b20aa244 Bug 404406 - s390x: implement z14 miscellaneous instructions
(from bug 404406 comment 0):
Valgrind on s390x currently lacks support for the miscellaneous
instruction extensions facility 2.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
2019-06-12 20:19:33 +02:00
Andreas Arnez
e63f93a970 s390x: Clean up s390-check-opcodes.pl
Fix false positives when invoking s390-check-opcodes.pl.  Also clean up
some code formatting issues in that script.  Add the instructions TPEI and
IRBM to guest_s390_toIR.c and s390-opcodes.csv, so they are not longer
warned about.
2019-06-12 20:12:21 +02:00
Mark Wielaard
461cc5c003 Cleanup GPL header address notices by using http://www.gnu.org/licenses/
Sync VEX/LICENSE.GPL with top-level COPYING file. We used 3 different
addresses for writing to the FSF to receive a copy of the GPL. Replace
all different variants with an URL <http://www.gnu.org/licenses/>.

The following files might still have some slightly different (L)GPL
copyright notice because they were derived from other programs:

- files under coregrind/m_demangle which come from libiberty:
  cplus-dem.c, d-demangle.c, demangle.h, rust-demangle.c,
  safe-ctype.c and safe-ctype.h
- coregrind/m_demangle/dyn-string.[hc] derived from GCC.
- coregrind/m_demangle/ansidecl.h derived from glibc.
- VEX files for FMA detived from glibc:
  host_generic_maddf.h and host_generic_maddf.c
- files under coregrin/m_debuginfo derived from LZO:
  lzoconf.h, lzodefs.h, minilzo-inl.c and minilzo.h
- files under coregrind/m_gdbserver detived from GDB:
  gdb/signals.h, inferiors.c, regcache.c, regcache.h,
  regdef.h, remote-utils.c, server.c, server.h, signals.c,
  target.c, target.h and utils.c

Plus the following test files:

- none/tests/ppc32/testVMX.c derived from testVMX.
- ppc tests derived from QEMU: jm-insns.c, ppc64_helpers.h
  and test_isa_3_0.c
- tests derived from bzip2 (with embedded GPL text in code):
  hackedbz2.c, origin5-bz2.c, varinfo6.c
- tests detived from glibc: str_tester.c, pth_atfork1.c
- test detived from GCC libgomp: tc17_sembar.c
- performance tests derived from bzip2 or tinycc (with embedded GPL
  text in code): bz2.c, test_input_for_tinycc.c and tinycc.c
2019-05-26 20:07:51 +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
Julian Seward
40f8eb8d4c Finalise bug-fix status notes. 2019-04-08 07:22:28 +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
Julian Seward
ec4fcffbac Update NEWS and docs/internals/3_14_BUGSTATUS.txt to reflect current bug-fix status. 2019-04-01 15:31:13 +02:00
Julian Seward
dffe3a2d1b Add a 3_14_BUGSTATUS.txt file and add to it all bugs reported since 3.14 was release.
At least, the bugs are post-triaged ones, so some have been removed.
2019-03-10 11:11:16 +01: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
Vadim Barkov
86bd889458 Bug 385411 s390x: Tests and internals for z13 vector FP support
Add test cases for the z13 vector FP support.  Bring s390-opcodes.csv
up-to-date, reflecting that the z13 vector instructions are now supported.
Also remove the non-support disclaimer for the vector facility from
README.s390.

The patch was contributed by Vadim Barkov, with some clean-up and minor
adjustments by Andreas Arnez.
2018-11-30 14:29:39 +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