196 Commits

Author SHA1 Message Date
Paul Floyd
e2583c02a5 FreeBSD support, patch 2
Files in the root directory
Several Makefile.am files that have dependencies on FreeBSD autoconf
variables. Included a few new filter files to act as placeholders
to create new freebsd subdirectories.

Updated NEWS with the FreeBSD bugzilla items plus a couple of other
items fixed indirectly.
2021-10-07 08:18:47 +02:00
Mark Wielaard
a1364805fc Update helgrind and drd suppression libc and libpthread paths in glibc 2.34
glibc 2.34 moved all pthread functions into the main libc library.
And it changed the (in memory) path of the main libc library to
libc.so.6 (before it was libc-2.xx.so).

This breaks various standard suppressions for helgrind and drd.
Fix this by doing a configure check for whether we are using glibc
2.34 by checking whether pthread_create is in libc instead of in
libpthread. If we are using glibc then define GLIBC_LIBC_PATH and
GLIBC_LIBPTHREAD_PATH variables that point to the (regexp) path
of the library that contains all libc functions and pthread functions
(which will be the same path for glibc 2.34+).

Rename glibc-2.34567-NPTL-helgrind.supp to glibc-2.X-helgrind.supp.in
and glibc-2.X-drd.supp to glibc-2.X-drd.supp.in and replace the
GLIBC_LIBC_PATH and GLIBC_LIBPTHREAD_PATH at configure time.

The same could be done for the glibc-2.X.supp.in file, but hasn't
yet because it looks like most suppressions in that file are obsolete.
2021-07-21 18:31:26 +02:00
Paul Floyd
dde556d51f Add musl.supp to SUPP_FILES 2021-03-20 08:51:52 +01:00
Mark Wielaard
c9d1cd0db3 Use pkglibexec as vglibdir.
vglibdir is the directory from where valgrind loads its internal tool
executables and vgpreloads. Currently vglibdir is pkglibdir, so those
internal tools are intermingeled with normal executables and libraries
that the user might use directly.

Make vglibdir equal to pkglibexecdir so the internal tools get installed
and loaded from libexec and don't get get stored under lib.

This leaves just the static archives and the mpiwrapper libraries that
the user would link/load themselves under pkglibdir.

This seems more in line with the FHS lib/libexec standard and makes it
slightly easier to combine the tools from a multilib target (say the
memcheck-amd64-linux and memcheck-x86-linux tools) because they would
be installed under the same directory, while the pkglibdir can differ
depending on arch/target (lib/lib64).

https://bugs.kde.org/show_bug.cgi?id=433323
2021-02-28 17:49:40 +01:00
Mark Wielaard
5efd866df2 Add new auxchecks target that runs GNU Scientific Library tests.
Replace the gsl16test script under auxprogs that you run by hand
with a new make target auxchecks which fetches the source code,
patches, reconfigures and builds all tests. Then run all tests
under valgrind.
2020-07-02 18:44:56 +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
Rhys Kidd
901cec4bce Add missing documentation file from EXTRA_DIST
Ensure this documentation file is included in tarball.

Fixes: 9f3d49a ("Create 3.10.0 section in NEWS, add (first draft of) README_DEVELOPERS_processes")
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
2019-03-11 22:49:37 +11:00
Rhys Kidd
fbc91518e5 Makefile.am: Consistent indent and align
This approach is utilized consistently throughout the file, and would make
alphabetical reordering easier. Adopt it here as well.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
2019-03-11 22:49:37 +11:00
Rhys Kidd
bdfab93fab config: Set automake options consistenly in one location
Avoid use of two manners of setting automake configuration options,
and consolidate them into AM_INIT_AUTOMAKE macro.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
2019-03-11 22:49:37 +11: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
Rhys Kidd
353a3587bb Fix macOS 10.13 building from tarball
Fixes: 1ce04c3 ("Preliminary support for Darwin 17.x (macOS 10.13)")
2018-10-07 21:26:35 -04:00
Mark Wielaard
6d100a3d36 Protect vgversion.h in a tarball from getting deleted by make clean
Create a file vgversion_dist.h in the tarball.
This file is not deleted by make clean
Change auxprogs/make_or_upd_vgversion_h to use vgversion_dist.h if it is
available.
Add some missing quotes to auxprogs/make_or_upd_vgversion_h

Patch by Matthias Schwarzott <zzam@gentoo.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16398
2017-05-18 08:39:21 +00:00
Mark Wielaard
3387b8ba5f Fix vgversion.h generation for builddir != srcdir.
Make sure to include the builddir include directory to find the
generated vgversion.h. Make include/vgversion.h a .PHONY target
so it always gets regenerated even if the file is already there.
Make sure to run svnversion in the srcdir.

Patch by Matthias Schwarzott <zzam@gentoo.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16397
2017-05-17 20:38:18 +00:00
Mark Wielaard
6f4b5a256d Add include/vgversion.h to clean-local.
It is a generated file that needs to be cleaned up.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16389
2017-05-16 15:17:13 +00:00
Mark Wielaard
f604ab59e1 Call $(top_srcdir)/auxprogs/make_or_upd_vgversion_h.
Fixes srcdir != builddir builds.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16387
2017-05-16 15:17:10 +00:00
Philippe Waroquiers
11671ae1d3 352395 - Please provide SVN revision info in --version -v
Finally committed ... :)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16164
2016-11-29 22:32:27 +00:00
Rhys Kidd
ab2edd2901 Preliminary support for macOS Sierra (10.12). Does not fully resolve bz#365327.
No regressions on OS X 10.11.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15976
2016-09-22 02:55:24 +00:00
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00
Rhys Kidd
0fcd971d15 Preliminary support for OS X 10.11 (El Capitan). Refer BZ#348909 for ongoing work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15403
2015-07-08 13:46:57 +00:00
Julian Seward
3f24896f10 Back out r14781, which was unintended.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14782
2014-11-25 11:43:54 +00:00
Julian Seward
bf927a2e32 arm64: implement "BRK #imm16".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14781
2014-11-25 11:37:14 +00:00
Julian Seward
ca44cf32c3 Build system changes to enable building on MacOS X 10.10 (Yosemite).
See bug 339045.  Part of a patch from fxcoudert@gcc.gnu.org.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14695
2014-11-06 20:16:05 +00:00
Julian Seward
91350dc8a5 Add initial build support for Mac OS X 10.9 (Mavericks). Bug 326724
comment 12.  (Diego Giagio, diego@giagio.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14055
2014-06-20 11:48:38 +00:00
Mark Wielaard
fbd9fe855d Out of tree build. Partial fix for Bug 333628.
Patch by Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>.
Partial fix. make && make check now works with builddir != srcdir.
But make regtest doesn't yet.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13949
2014-05-09 13:34:13 +00:00
Mark Wielaard
f68b1089a7 Make sure all files under the new shared dir are included in make dist.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13868
2014-03-11 19:30:32 +00:00
Julian Seward
aa7f3955f4 Update implementation notes for the arm64-linux port.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13775
2014-01-13 11:50:17 +00:00
Florian Krohm
e9e22a3a00 Add a script 'check_headers_and_includes' to check that #include directives
are not against the grain.
Wrap this script together with 'check_makefile_consistency' into
'post_regtest_checks' and invoke that from the toplevel Makefile. So we can
easily add new checkers in the future.

Add a new make target 'post-regtest-checks' to just run those checks
and nothing else.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13570
2013-09-19 14:55:09 +00:00
Julian Seward
c2326cb8f0 Include autogen.sh in the tarfile. See #306310.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12983
2012-09-17 17:17:00 +00:00
Philippe Waroquiers
8d4c0e4bd6 Fix 306310 3.8.0 release tarball missing some files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12964
2012-09-11 19:53:01 +00:00
Florian Krohm
0d0e6346db Add a tester for V-bit propagation through IROps.
The tester is located in memcheck/tests/vbit-test.
It needs the following support on the valgrind / VEX side:
(1) a new client request VG_USERREQ__VEX_INIT_FOR_IRI
(2) a new "special instruction" on all architectures inserted via
    VALGRIND_VEX_INJECT_IR
(3) VEX changes to detect the special insn and insert IR (ir_inject.c)

The README file in vbit-test has some more information.
See also VEX r2490.  Fixes bugzilla #300102.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12906
2012-08-28 16:50:39 +00:00
Julian Seward
ccc74aefd3 Move older news into its own file, NEWS.old, so as not to overrun TeX
default memory limits when building the PDF docs.  Fixes #304754.
(Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12863
2012-08-08 20:38:03 +00:00
Julian Seward
f0c0f9f3ce Add initial support for MacOSX 10.8. Note this is still very borked
and pretty much unusable for real work.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12814
2012-08-02 18:25:04 +00:00
Petar Jovanovic
7be71ddd81 Adding README.mips to EXTRA_DIST in Makefile.am.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12678
2012-06-27 16:07:30 +00:00
Florian Krohm
46b85eeb12 Require automake-1.10 for proper handling of include file dependencies
in .S files. Also included here is some cleanup, including a reversion
of r10378. Fixes bugzilla #197914.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12555
2012-05-06 03:37:25 +00:00
Philippe Waroquiers
57ec7947c7 Remove strange e which appeared in r12456, replace by a real e.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12457
2012-03-25 14:55:17 +00:00
Philippe Waroquiers
565baa930a Have check_makẹfile_consistency run at the end of make regtest
This ensures that a missing file in the Makefile is detected,
without blocking the tests.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12456
2012-03-25 10:54:59 +00:00
Tom Hughes
e9f922b442 Hide our use of pkglibdir to stop automake 1.11.2 and later complaining.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12396
2012-02-21 15:53:35 +00:00
Florian Krohm
bc733a9e4a Remove TEST_TOOLS and TEXT_EXP_TOOLS as they are no longer needed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12262
2011-11-08 20:16:09 +00:00
Bart Van Assche
b89d16e2ba Check Makefile.am consistency before running regression tests. Closes #283813.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12214
2011-10-23 12:14:51 +00:00
Julian Seward
8885c4e740 Add initial support for Mac OS X 10.7 (Lion). Tracked by bug #275168.
* configure.in support

* new supp file darwin11.supp

* comment out many intercepts in mc_replace_strmem.c and
  vg_replace_malloc.c that are apparently unnecessary for Darwin

* add minimal handling for the following new syscalls and mach traps:
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost

* wqthread_hijack on amd64-darwin: deal with
  tst->os_state.pthread having an apparently different offset,
  which caused an assertion failure

* m_debuginfo: for 32 bit processes on Lion, use the DebugInfoFSM
  cleanup added in r12041/12042 to handle apparently new dyld
  behaviour, which is to map text areas r-- first and only
  vm_protect them later to r-x.



The following cleanups remain to be done

* remove apparently pointless, commented out wrapper macro
  invokations in mc_replace_strmem.c, eg

  //MEMMOVE(VG_Z_DYLD,        memmove)

  (or determine that they are still necessary, and uncomment)


* ditto in vg_replace_malloc.c, plus general VGO_darwin cleanups
  there


* write proper syscall wrappers for
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost
  These are currently just no-ops and may be causing Memcheck to
  report false undef-value errors


* figure out why it doesn't work properly unless built with gcc-4.2 on
  Lion.

  gcc-4.2 is the "normal" gcc (i686-apple-darwin11-gcc-4.2.1).  Plain
  gcc is the hybrid gcc-front-end clang-back-end thing
  (i686-apple-darwin11-llvm-gcc-4.2).  Whereas on Snow Leopard, plain
  gcc is the normal gcc.

  The symptoms of the failure are that wqthread_hijack in
  syswrap-amd64-linux.c hits this /*NOTREACHED*/ vg_assert(0); right
  at the end (you need a pretty complex threaded app to trigger this),
  which makes me think that either ML_(wqthread_continue_NORETURN) or
  call_on_new_stack_0_1 do return, which they are not expected to.


* figure out if some of the uninitialised value errors reported in
  system libraries on are caused by Memcheck being confused by LLVM
  generated code, as per bug #242137



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12043
2011-09-21 08:43:08 +00:00
Nicholas Nethercote
178baefe16 I am an idiot: remove the beginnings of an experimental tool that I
accidentally committed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11957
2011-08-08 02:27:20 +00:00
Nicholas Nethercote
a71f5978fc Fix a Massif bug: when realloc'ing a block, any values in the part of the
block beyond the original request weren't copied.  They are now.  This is
important because a program could use malloc_usable_size to gain legitimate
access to those extra bytes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11956
2011-08-08 01:58:50 +00:00
Julian Seward
634a591426 Add a file containing information on how to cross-compile for Android.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11888
2011-07-12 13:34:31 +00:00
Julian Seward
887fed8e7b Add a suppression file for Android's libc (bionic).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11873
2011-07-11 20:52:10 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Julian Seward
b71e8bb6c5 Rename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not cause
too much build carnage.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11745
2011-05-11 16:04:28 +00:00
Julian Seward
2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +00:00
Julian Seward
dae0b7a571 'make dist' fixes following s390x-linux merge. (Christian Borntraeger
<borntraeger@de.ibm.com>)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11616
2011-03-10 12:36:09 +00:00
Julian Seward
230002ce29 Add DHAT as an experimental tool. DHAT (a Dynamic Heap Analysis Tool)
is a heap profiler that is complementary to Massif.  DHAT tracks heap
allocations, and connects which memory accesses are to which blocks.
It can find the following information:

* total allocation and max liveness

* average block lifetime (# instructions between allocation and
  freeing)

* average number of reads and writes to each byte in the block
  ("access ratios")

* average of longest interval of non-access to a block, also 
  measured in instructions

* which fields of blocks are used a lot, and which aren't
  (hot-field profiling)

Using these stats it is possible to identify allocation points with
the following characteristics:

* potential process-lifetime leaks (blocks allocated by the point just
  accumulate, and are freed only at the end of the run)

* excessive turnover: points which chew through a lot of heap, even if
  it is not held onto for very long

* excessively transient: points which allocate very short lived blocks

* useless or underused allocations: blocks which are allocated but not
  completely filled in, or are filled in but not subsequently read.

* blocks which see extended periods of inactivity.  Could these
  perhaps be allocated later or freed sooner?

* blocks with inefficient layout (hot fields spread out over
  multiple cache lines), or with alignment holes



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11431
2010-10-12 10:09:15 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00