111 Commits

Author SHA1 Message Date
Tom Hughes
141ec942a1 Add support for the perf_counter_open system call. Fixes #211498.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10907
2009-10-27 09:19:26 +00:00
Tom Hughes
bba592e3fc Improve futex system call support. Patch from BZ#201757 which I have
attempted to cross check against current kernel code. Reading the
futex system call code mostly just made my head hurt however...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10656
2009-07-29 11:09:01 +00:00
Julian Seward
e7dde85a24 Merge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.
This commit tidies up and rationalises what could be called the
"messaging" system -- that part of V to do with presenting output to
the user.  In particular it brings significant improvements to XML
output.

Changes are:

* XML and normal text output now have separate file descriptors,
  which solves longstanding problems for XML consumers caused by
  the XML output getting polluted by unexpected non-XML output.

* This also means that we no longer have to hardwire all manner
  of output settings (verbosity, etc) when XML is requested.

* The XML output format has been revised, cleaned up, and made
  more suitable for use by error detecting tools in general
  (various Memcheck-specific features have been removed).  XML
  output is enabled for Ptrcheck and Helgrind, and Memcheck is
  updated to the new format.

* One side effect is that the behaviour of VG_(message) has been
  made to be consistent with printf: it no longer automatically
  adds a newline at the end of the output.  This means multiple
  calls to it can be used to build up a single line message; or a
  single call can write a multi-line message.  The ==pid==
  preamble is automatically inserted at each newline.

* VG_(message)(Vg_UserMsg, ..args..) now has the abbreviated form
  VG_(UMSG)(..args..); ditto VG_(DMSG) for Vg_DebugMsg and
  VG_(EMSG) for Vg_DebugExtraMsg.  A couple of other useful
  printf derivatives have been added to pub_tool_libcprint.h,
  most particularly VG_(vcbprintf).

* There's a small change in the core-tool interface to do with
  error handling: VG_(needs_tool_errors) has a new method
  void (*before_pp_Error)(Error* err)  which, if non-NULL, is
  called just before  void (*pp_Error)(Error* err).  This is to
  give tools the chance to look at errors before any part of them
  is printed, so they can print any XML preamble they like.

* coregrind/m_errormgr.c has been overhauled and cleaned up, and
  is a bit simpler and more commented.  In particular pp_Error
  and VG_(maybe_record_error) are significantly changed.

The diff is huge, but mostly very boring.  Most of the changes
are of the form

-   VG_(message)(Vg_UserMsg, "this is a message %d", n);
+   VG_(message)(Vg_UserMsg, "this is a message %d\n", n);

Unfortunately as a result of this, it touches a large number
of source files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10465
2009-07-15 14:48:32 +00:00
Tom Hughes
d9a6e3b3f7 Validate the file descriptor argument to fallocate.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10463
2009-07-15 07:47:49 +00:00
Nicholas Nethercote
9ca3448218 Add support on Darwin for mount(). Finishes off bug 198624.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10461
2009-07-15 06:39:15 +00:00
Nicholas Nethercote
f00335141b Handle fallocate() on 64-bit platforms. Fixes bug 185794.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10456
2009-07-15 03:08:35 +00:00
Bart Van Assche
37252cc26c Fixed recently introduced compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10453
2009-07-14 16:36:40 +00:00
Nicholas Nethercote
00057df2c4 Some ioctls don't look at ARG3 at all. Based on patches from Clemens
Ladisch.  Fixes bug 159501.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10441
2009-07-14 00:06:00 +00:00
Nicholas Nethercote
230d940241 Fix wrapper for ioctl(VT_GETSTATE). Patch from Garrett D'Amore. Fixes bug
139076.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10437
2009-07-13 06:43:19 +00:00
Nicholas Nethercote
400b917577 Handle epoll_create1. Patch from Sam Varshavchik. Fixes bug 188427.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10427
2009-07-10 12:02:03 +00:00
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
4ddfee7723 Fix URB ioctl handling. Patch from Hector Martin (bug 191095).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10286
2009-06-09 23:03:02 +00:00
Nicholas Nethercote
a01f086879 Handle another Linux ioctl. Patch from Jay Foad.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10284
2009-06-09 22:31:00 +00:00
Nicholas Nethercote
d3c159040a Abort on unknown fcntl, rather than doing no checking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10094
2009-05-22 00:38:15 +00:00
Nicholas Nethercote
b4dbd225dd DARWIN sync: add ML_({PRE,POST}_unknown_ioctl).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10089
2009-05-22 00:15:06 +00:00
Nicholas Nethercote
131ab00744 Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from the
DARWIN branch.  A big ugly DARWIN/trunk sync commit, mostly to do with
changing the representation of SysRes and vki_sigset_t.  Functionality of
the trunk shouldn't be changed by it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9876
2009-05-18 02:12:08 +00:00
Nicholas Nethercote
3b87b28ca4 Merge r9828 (fix aspacem layering violation) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9831
2009-05-10 22:42:19 +00:00
Tom Hughes
2d43007ce1 Add SIOCGSTAMPNS support. Fixes #188530.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9502
2009-03-31 10:36:58 +00:00
Nicholas Nethercote
2001629c3f Updated copyright years.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344
2009-03-10 22:02:09 +00:00
Nicholas Nethercote
70150c5884 Use "status" as the argname for 'exit' and 'exit_group'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9311
2009-03-03 05:39:23 +00:00
Nicholas Nethercote
87b5e49494 Merge a large chunk of r8949 (the part that moved fcntl and ioctl wrappers
out of syswrap-generic into syswrap-linux) from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9219
2009-02-22 23:00:30 +00:00
Nicholas Nethercote
3bfae3eec1 Merged r9185 (fix up getsockopt mess) from the DARWIN branch, minus the
Darwin-specific parts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9186
2009-02-17 00:23:30 +00:00
Julian Seward
f3523a4a0e Some minor format string fixes for gcc-3.3.3 (SuSE 9.1). Not sure why
later gccs don't complain about these.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9019
2009-01-22 12:24:26 +00:00
Tom Hughes
f1ac1fd992 Add signalfd4 support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8930
2009-01-09 16:42:51 +00:00
Tom Hughes
2ebda825b1 Add support ioprio_get and wire up ioprio_set on all platforms.
Fixes bug #177819.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8826
2008-12-15 08:58:29 +00:00
Julian Seward
05e92e79d9 Fix format string warning in PRE(sys_eventfd2).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8817
2008-12-12 08:08:58 +00:00
Tom Hughes
4d4d4c10fe Add support for eventfd2 (and wire up pipe2 on PPC platforms).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8815
2008-12-10 09:28:56 +00:00
Julian Seward
2ebd38040f Handle sys_lookup_dcookie on amd64-linux (Andrew Haley). Also take
the opportunity to move the handlers from syswrap-generic.c (which
they certainly aren't) to syswrap-linux.c.  Fixes #175044.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8769
2008-11-16 21:40:54 +00:00
Julian Seward
2a5db7f788 Support sys_stime on x86-linux. Fixes #159285.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8736
2008-11-06 23:11:42 +00:00
Julian Seward
f4bffe6909 Support sys_pipe2 on {amd64,x86}-linux. Also, update syscall numbers
for all supported Linuxes to those in linux-2.6.28-rc3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8730
2008-11-05 11:20:59 +00:00
Nicholas Nethercote
0cf8a14c70 - Reinstate the 'atfork' from 2.4.0, which was more powerful, and expose it to
tools.
- Factor out 'execv' from 'system' and expose it to tools.

Partly based on a patch from Robert O'Callahan.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8669
2008-10-13 04:19:15 +00:00
Bart Van Assche
8e96150945 Merged FORMATCHECK branch (r8368) to trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369
2008-07-07 06:49:24 +00:00
Bart Van Assche
bd28f145d5 Moved support for Linux-specific system call sys_init_module from generic to Linux wrappers. Added wrapper for sys_delete_module system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8266
2008-06-21 16:28:24 +00:00
Julian Seward
1fb920eeb5 Add '*flags |= SfMayBlock' to PRE(sys_sync_file_range).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8177
2008-06-04 06:49:56 +00:00
Julian Seward
b2651c395b More fiddling with the sys_signalfd wrapper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8147
2008-05-29 12:56:08 +00:00
Julian Seward
178fbd72d3 Tidy up timerfd wrapper stuff a bit:
* make linux_kernel_2_6_22 return Bool

* linux_kernel_2_6_22: don't assert if /proc/sys/kernel/osrelease
  can't be opened

* PRE(sys_timerfd_create), PRE(sys_signalfd):
  use %ld for Word arguments, and use house types



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8138
2008-05-28 11:06:08 +00:00
Bart Van Assche
0f6897cc6c Removed the superfluous casts that were introduced in r8132.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8136
2008-05-28 07:09:54 +00:00
Bart Van Assche
dcf69a8cb2 sys_timerfd() and sys_signalfd() wrappers now interpret their first argument consistently as signed instead of unsigned. Fixes #162663.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8132
2008-05-26 17:16:08 +00:00
Julian Seward
22e711d457 Fix wrappers for sys_futimesat and sys_utimensat. (Dan Kegel)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8047
2008-05-12 14:29:23 +00:00
Bart Van Assche
bcb85a68fb Make sure the test for kernel version 2.6.22 will work correctly for the future kernel versions 2.6.220 .. 2.6.229.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7971
2008-05-01 12:35:48 +00:00
Bart Van Assche
c6d4c09e7c Added support for timerfd_create(), timerfd_gettime() and timerfd_settime() system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7942
2008-04-27 12:56:06 +00:00
Bart Van Assche
e31611fb5c Added support for epoll_pwait(), utimensat(), eventfd(), timerfd() and signalfd(). Fixes bug 160907.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7917
2008-04-26 07:45:10 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Tom Hughes
cbb3cb05a5 Add support for the sync_file_range system call.
Based on patch from Russell Sears <sears@cs.berkeley.edu>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7324
2008-01-08 16:31:25 +00:00
Tom Hughes
e25736ec6c Valid file descriptor argument to llseek system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7322
2008-01-08 13:54:43 +00:00
Julian Seward
931a40e83b Core-tool iface changes needed to support exp-drd (Bart Van Assche).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7212
2007-11-25 14:06:06 +00:00
Julian Seward
4d601bfed7 Support sys_utimensat on x86-linux. (Dan McGee)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7195
2007-11-20 23:41:23 +00:00
Julian Seward
29ff6066e9 Add a new flag, --child-silent-after-fork=no|yes [no]. When enabled,
causes child processes after fork to fall completely silent, which can
make the output a lot less confusing.  In addition it is pretty much
essential in XML output mode, so as to avoid mixing up any child XML
output with the parent's.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7177
2007-11-17 22:29:25 +00:00
Julian Seward
8dd547a530 Don't segfault on syscall (SYS_io_destroy, 0). (Jakub Jelinek) Fixes
#147325.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7170
2007-11-17 01:49:06 +00:00
Julian Seward
4044188f76 Add support for private futexes (whatever they might be). Patch from
Eric Dumazet.  Fixes #146781.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7169
2007-11-17 01:35:08 +00:00