]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
14 years agoPipe CFLAGS through to the compile run for genoffsets.c, which is a
Julian Seward [Thu, 7 Jul 2011 14:05:39 +0000 (14:05 +0000)] 
Pipe CFLAGS through to the compile run for genoffsets.c, which is a
bit special.  CFLAGS is already piped through to everywhere else.
This is needed for working with semi-broken cross-compile setups that
need CFLAGS set to special values in order to work.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11861

14 years agoAdd a spec rule for NZ after LOGICQ, whilst chasing after a strange
Julian Seward [Thu, 7 Jul 2011 13:58:10 +0000 (13:58 +0000)] 
Add a spec rule for NZ after LOGICQ, whilst chasing after a strange
interaction between Memcheck and Clang-generated code.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2169

15 years agoMove the break out of the braces so that we don't fall through
Tom Hughes [Wed, 6 Jul 2011 14:11:56 +0000 (14:11 +0000)] 
Move the break out of the braces so that we don't fall through
into the next case when no argument was given to the ioctl.

Spotted by IBM's BEAM checker.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11860

15 years agoDon't allocate the XArray for the text version of the suppression
Tom Hughes [Wed, 6 Jul 2011 14:08:24 +0000 (14:08 +0000)] 
Don't allocate the XArray for the text version of the suppression
until after we've checked if the tool will allow the error to be
suppressed, or we will leak it if we do the early return.

Spotted by IBM's BEAM checker.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11859

15 years agoDisable stabs reading on ppc64-linux; it always segfaults.
Julian Seward [Wed, 6 Jul 2011 07:23:56 +0000 (07:23 +0000)] 
Disable stabs reading on ppc64-linux; it always segfaults.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11858

15 years agoEnable testing of fres{.} and frsqrt{.} instructions. Fixes #275308.
Julian Seward [Tue, 5 Jul 2011 10:20:44 +0000 (10:20 +0000)] 
Enable testing of fres{.} and frsqrt{.} instructions.  Fixes #275308.
Based on a patch by Maynard Johnson <maynardj@us.ibm.com>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11857

15 years agoImplement some extra DWARF ops that gcc 4.6.1 seems to use. Fixes #275284.
Tom Hughes [Tue, 5 Jul 2011 09:22:32 +0000 (09:22 +0000)] 
Implement some extra DWARF ops that gcc 4.6.1 seems to use. Fixes #275284.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11856

15 years agoMake the wait-for-gdb delay loop somewhat more modern-compiler-proof.
Julian Seward [Tue, 5 Jul 2011 09:13:41 +0000 (09:13 +0000)] 
Make the wait-for-gdb delay loop somewhat more modern-compiler-proof.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11855

15 years agoImprove debug printing for ELF program header analysis. No functional
Julian Seward [Tue, 5 Jul 2011 09:13:04 +0000 (09:13 +0000)] 
Improve debug printing for ELF program header analysis.  No functional
change.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11854

15 years agoRename S390_GUEST_OFFSET to S390X_GUEST_OFFSET and use
Florian Krohm [Tue, 5 Jul 2011 02:48:39 +0000 (02:48 +0000)] 
Rename S390_GUEST_OFFSET to S390X_GUEST_OFFSET and use
it throughout.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2168

15 years agoMisc s390x cleanups
Florian Krohm [Tue, 5 Jul 2011 02:09:01 +0000 (02:09 +0000)] 
Misc s390x cleanups
- Give more functions internal linkage
- Remove unneeded tag names

git-svn-id: svn://svn.valgrind.org/vex/trunk@2167

15 years agoGDB server: fix tests following recent commits.
Julian Seward [Mon, 4 Jul 2011 22:00:41 +0000 (22:00 +0000)] 
GDB server: fix tests following recent commits.
Fixes #276987.  (Philippe Waroquiers, philippe.waroquiers@skynet.be)

* make_local_links
  - disable gdb tests if gdb version < 7
  - disable pic tests if gdb version < 7.1
* nlfork_chain test
  - reduce chain from 20 to 15 to avoid ENOMEM
    on small ARM systems
* main_pic.c
  - put break at line 11 rather than main entry, as ARM gdb
     does not properly show main args till it has started executing.
* passsigalrm.c
  - do not setsa.sa_restorer (obsolete on linux, unknown on darwin)
* mcvabits.vgtest
  - make prereq consistent with other tests
* filter_gdb
  - upgraded filter to new linenr in clean_after_fork.c

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11853

15 years agoThumb2 front end: improved analysis of IT instructions that might
Julian Seward [Mon, 4 Jul 2011 16:58:40 +0000 (16:58 +0000)] 
Thumb2 front end: improved analysis of IT instructions that might
guard the one being translated, with the goal of proving this
isn't the case more of the time.  Reduces the amount of generated
code by about 10% with --tool=none, and performance improvements
(also with --tool=none) of up to 25% have been observed.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2166

15 years agoUpdate Subversion ignore lists
Bart Van Assche [Sun, 3 Jul 2011 16:43:01 +0000 (16:43 +0000)] 
Update Subversion ignore lists

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11852

15 years agodrd: Source code cleanup - merge two blocks of tracing code
Bart Van Assche [Sun, 3 Jul 2011 11:43:45 +0000 (11:43 +0000)] 
drd: Source code cleanup - merge two blocks of tracing code

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11851

15 years agodrd: Source code cleanup - outdent a code block
Bart Van Assche [Sun, 3 Jul 2011 11:42:03 +0000 (11:42 +0000)] 
drd: Source code cleanup - outdent a code block

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11850

15 years agodrd: Simplify a boolean expression
Bart Van Assche [Sun, 3 Jul 2011 11:41:27 +0000 (11:41 +0000)] 
drd: Simplify a boolean expression

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11849

15 years agodrd: Source code cleanup - change two variables from int to bool and outdent one...
Bart Van Assche [Sun, 3 Jul 2011 11:40:49 +0000 (11:40 +0000)] 
drd: Source code cleanup - change two variables from int to bool and outdent one code block

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11848

15 years agodrd: Add an assert statement
Bart Van Assche [Sun, 3 Jul 2011 11:39:30 +0000 (11:39 +0000)] 
drd: Add an assert statement

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11847

15 years agodrd: remove a duplicate tl_assert() statement.
Bart Van Assche [Sun, 3 Jul 2011 11:24:41 +0000 (11:24 +0000)] 
drd: remove a duplicate tl_assert() statement.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11846

15 years agoSynch s390x system call list with linux 2.6.39.2.
Florian Krohm [Tue, 28 Jun 2011 23:37:01 +0000 (23:37 +0000)] 
Synch s390x system call list with linux 2.6.39.2.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11845

15 years agovalgrind and tool mon. cmds prefixes changes + doc fixes + new vgdb option
Julian Seward [Tue, 28 Jun 2011 08:20:39 +0000 (08:20 +0000)] 
valgrind and tool mon. cmds prefixes changes + doc fixes + new vgdb option
--cmd-time-out

* changed prefixes of Valgrind core monitor commands from vg. to v.
* removed prefixes of Tool monitor commands
* memcheck leak_check 'leakpossible' arg renamed to 'possibleleak'
* memcheck make_memory 'ifaddressabledefined' arg renamed to
'Definedifaddressable'
    (with uppercase D to avoid confusion with 'defined' arg).
* vgdb options
  - Some doc updates : more logical option order documentation,
       specify 'standalone' for options aimed at standalone usage.
  - added option --cmd-time-out for standalone vgdb
     (comment of Josef Weindendorfer, needed to interface with a callgrind GUI)
* updated tests according to the above.
* updated documentation according to the above.
* some additional minor doc fixes/clarifications

(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 111.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11844

15 years agoAnother make dist fix.
Julian Seward [Tue, 28 Jun 2011 07:38:17 +0000 (07:38 +0000)] 
Another make dist fix.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11843

15 years agoDelete the AIX5 port. The last release this worked for is 3.4.1,
Julian Seward [Tue, 28 Jun 2011 07:25:29 +0000 (07:25 +0000)] 
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

15 years agoFix 'make dist' following recent gdbserver commits.
Julian Seward [Mon, 27 Jun 2011 23:31:07 +0000 (23:31 +0000)] 
Fix 'make dist' following recent gdbserver commits.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11841

15 years agoSuppress warning about associativity change for tests
Josef Weidendorfer [Mon, 27 Jun 2011 17:26:19 +0000 (17:26 +0000)] 
Suppress warning about associativity change for tests

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11840

15 years agoRemove references to Ptrcheck in the documentation, and replace
Julian Seward [Sun, 26 Jun 2011 19:57:26 +0000 (19:57 +0000)] 
Remove references to Ptrcheck in the documentation, and replace
them as relevant with references to SGcheck.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11839

15 years agoMemcheck:
Julian Seward [Sun, 26 Jun 2011 12:41:33 +0000 (12:41 +0000)] 
Memcheck:
* add delta leak checking functionality
* some editing of related manual sections
(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 105.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11838

15 years agoGDB server:
Julian Seward [Sun, 26 Jun 2011 09:36:38 +0000 (09:36 +0000)] 
GDB server:
* Fix bug in logic related to signal-passing
* use SIGSTOP instead of SIGTRAP (avoid race condition)
(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 109.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11837

15 years agoAdd support for PIC executables (e.g. firefox on Ubuntu 11) by adding
Julian Seward [Sun, 26 Jun 2011 09:26:48 +0000 (09:26 +0000)] 
Add support for PIC executables (e.g. firefox on Ubuntu 11) by adding
the "auxv" protocol packet to gdbsrv.  (Philippe Waroquiers,
philippe.waroquiers@skynet.be).  Bug 214909 comment 108.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11836

15 years agoGDB server:
Julian Seward [Sun, 26 Jun 2011 09:13:27 +0000 (09:13 +0000)] 
GDB server:
* fix error in usability msg
* make a test more deterministic
(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 107.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11835

15 years agoMinor documentation fixes for the GDB server. (Philippe Waroquiers,
Julian Seward [Sat, 25 Jun 2011 10:05:28 +0000 (10:05 +0000)] 
Minor documentation fixes for the GDB server.  (Philippe Waroquiers,
philippe.waroquiers@skynet.be).  Bug 214909 comment 106.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11834

15 years agoAnnounce fix of #275710
Florian Krohm [Sat, 25 Jun 2011 02:28:00 +0000 (02:28 +0000)] 
Announce fix of #275710

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11833

15 years agoGet rid of redundant address mode calculation.
Florian Krohm [Sat, 25 Jun 2011 02:25:41 +0000 (02:25 +0000)] 
Get rid of redundant address mode calculation.
Fixes #275710.   (Christian Borntraeger <borntraeger@de.ibm.com>)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2165

15 years agoGet rid of some compiler warnings.
Florian Krohm [Sat, 25 Jun 2011 02:06:21 +0000 (02:06 +0000)] 
Get rid of some compiler warnings.
Fixes 275339 (Christian Borntraeger <borntraeger@de.ibm.com>)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11832

15 years agoUpdate ignored files for exp-sgcheck.
Florian Krohm [Sat, 25 Jun 2011 01:54:03 +0000 (01:54 +0000)] 
Update ignored files for exp-sgcheck.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11831

15 years agoUpdate ignored files for s390x
Florian Krohm [Sat, 25 Jun 2011 01:50:55 +0000 (01:50 +0000)] 
Update ignored files for s390x

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11830

15 years agoFix #undefs that are inconsistent with those further up the file,
Julian Seward [Fri, 24 Jun 2011 18:26:11 +0000 (18:26 +0000)] 
Fix #undefs that are inconsistent with those further up the file,
as spotted by Michael Meeks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11829

15 years agoDocumentation updates for Helgrind.
Julian Seward [Fri, 24 Jun 2011 18:23:42 +0000 (18:23 +0000)] 
Documentation updates for Helgrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11828

15 years agoAdd tests for displaying of locks held by threads in races.
Julian Seward [Fri, 24 Jun 2011 16:03:32 +0000 (16:03 +0000)] 
Add tests for displaying of locks held by threads in races.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11827

15 years agoFix up the remaining .stderr.exp-s following r11824 (merge of
Julian Seward [Fri, 24 Jun 2011 12:55:25 +0000 (12:55 +0000)] 
Fix up the remaining .stderr.exp-s following r11824 (merge of
branches/HGDEV2), and delete some redundant ones

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11826

15 years agoFix a bunch of helgrind .stderr.exp-s following r11824 (merge of
Julian Seward [Fri, 24 Jun 2011 10:50:11 +0000 (10:50 +0000)] 
Fix a bunch of helgrind .stderr.exp-s following r11824 (merge of
branches/HGDEV2)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11825

15 years agoMerge the contents of the HGDEV2 branch into trunk:
Julian Seward [Fri, 24 Jun 2011 10:09:41 +0000 (10:09 +0000)] 
Merge the contents of the HGDEV2 branch into trunk:
* performance and scalability improvements
* show locks held by both threads in a race
* show all 4 locks involved in a lock order violation
* better delimited error messages

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11824

15 years agoUpdate ignored files for VEX.
Florian Krohm [Thu, 23 Jun 2011 12:00:32 +0000 (12:00 +0000)] 
Update ignored files for VEX.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2164

15 years agoFix ignores for Darwin.
Robert Walsh [Sun, 19 Jun 2011 03:41:57 +0000 (03:41 +0000)] 
Fix ignores for Darwin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11823

15 years agoMinor GDBserver source tidying. Also a small usability fix: if
Julian Seward [Sat, 18 Jun 2011 08:28:04 +0000 (08:28 +0000)] 
Minor GDBserver source tidying.  Also a small usability fix: if
--vgdb-error=N is specified, print a bit of text telling the user the
magic commands to give GDB in order to attach to the process.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11822

15 years agoMove the GDBserver documentation from the "Valgrind core" chapter
Julian Seward [Fri, 17 Jun 2011 08:31:22 +0000 (08:31 +0000)] 
Move the GDBserver documentation from the "Valgrind core" chapter
to the "Valgrind core: advanced topics" chapter.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11821

15 years agoEdits for the GDBserver documentation.
Julian Seward [Fri, 17 Jun 2011 08:14:00 +0000 (08:14 +0000)] 
Edits for the GDBserver documentation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11820

15 years agoTrack vex r2163 (en-mass renaming of vector narrowing and widening primops)
Julian Seward [Thu, 16 Jun 2011 11:37:21 +0000 (11:37 +0000)] 
Track vex r2163 (en-mass renaming of vector narrowing and widening primops)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11819

15 years agoRename and rationalise the vector narrowing and widening primops, so
Julian Seward [Thu, 16 Jun 2011 11:36:23 +0000 (11:36 +0000)] 
Rename and rationalise the vector narrowing and widening primops, so
as to give them a consistent, understandable naming scheme.  Finishes
off the process that was begun in r2159.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2163

15 years agoReduce warning noise (make it in line with main Valgrind build)
Julian Seward [Thu, 16 Jun 2011 11:34:25 +0000 (11:34 +0000)] 
Reduce warning noise (make it in line with main Valgrind build)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2162

15 years agoFix safe_fd exhaustion in fork chain caused by non closing of shared_mem_fd
Julian Seward [Wed, 15 Jun 2011 21:30:55 +0000 (21:30 +0000)] 
Fix safe_fd exhaustion in fork chain caused by non closing of shared_mem_fd

Patch that fixes the problem reported by Christian Borntraeger.
The problem was created by keeping the shared memory mapped file opened
without reason till the process does an exec.
In case of a chain of forked processes (without exec), the range of safe_fd
reserved for Valgrind own usage becomes exhausted.

* coregrind/m_gdbserver/remote-utils.c :
   do not VG_(safe_fd) shared_mem_fd (as it is now closed directly)
   close shared_mem_fd once file is mmap-ed and written.
* gdbserver_tests/nlfork_chain.stderr.exp,nlfork_chain.vgtest,
               fork_chain.c,nlfork_chain.stdout.exp:
     new files
* gdbserver_tests/Makefile.am:
  modified for new nlfork_chain test

(patch from #214909 c 103,
Philippe Waroquiers, philippe.waroquiers@skynet.be)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11818

15 years agoUnbreak Altivec code following vex r2159 (renaming of
Julian Seward [Wed, 15 Jun 2011 19:07:26 +0000 (19:07 +0000)] 
Unbreak Altivec code following vex r2159 (renaming of
vector saturating narrowing primops)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11817

15 years agoUnbreak Altivec support following r2159 (rename of saturating
Julian Seward [Wed, 15 Jun 2011 19:06:36 +0000 (19:06 +0000)] 
Unbreak Altivec support following r2159 (rename of saturating
narrowing primops)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2161

15 years agoValgrind-side fixes and tests for PACKUSDW, to track r2160.
Julian Seward [Wed, 15 Jun 2011 16:07:15 +0000 (16:07 +0000)] 
Valgrind-side fixes and tests for PACKUSDW, to track r2160.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11816

15 years agoImplement PACKUSDW (SSE4.1). Fixes #274776.
Julian Seward [Wed, 15 Jun 2011 16:05:07 +0000 (16:05 +0000)] 
Implement PACKUSDW (SSE4.1).  Fixes #274776.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2160

15 years agoAdd debugging hack, if 0'd, to print a stack trace at each syscall.
Julian Seward [Wed, 15 Jun 2011 15:11:50 +0000 (15:11 +0000)] 
Add debugging hack, if 0'd, to print a stack trace at each syscall.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11815

15 years agoTrack renaming of vector saturating narrowing primops in r2159.
Julian Seward [Wed, 15 Jun 2011 15:11:07 +0000 (15:11 +0000)] 
Track renaming of vector saturating narrowing primops in r2159.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11814

15 years agoPartially fix underspecification of saturating narrowing primops that
Julian Seward [Wed, 15 Jun 2011 15:09:37 +0000 (15:09 +0000)] 
Partially fix underspecification of saturating narrowing primops that
became apparent whilst looking into the problem of implementing the
SSE4 packusdw instruction.  Probably breaks Altivec.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2159

15 years agoAdd rough list of bugs that have been fixed since 3.6.1 (74, + 3 n-i-bz,
Julian Seward [Mon, 13 Jun 2011 13:36:59 +0000 (13:36 +0000)] 
Add rough list of bugs that have been fixed since 3.6.1 (74, + 3 n-i-bz,
probably some more I missed)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11813

15 years agoTry to handle LL caches which are of size 50% above a power of 2 (eg,
Julian Seward [Mon, 13 Jun 2011 13:14:00 +0000 (13:14 +0000)] 
Try to handle LL caches which are of size 50% above a power of 2 (eg,
6MB, 12MB) and have a non-power-of-2 number of sets.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11812

15 years agoAdd cpuid cache values from Intel SDM 5/11
Josef Weidendorfer [Fri, 10 Jun 2011 20:29:27 +0000 (20:29 +0000)] 
Add cpuid cache values from Intel SDM 5/11

For a Sandybridge desktop, previously this resulted in
...
--14842-- warning: Unknown Intel cache config value (0x76), ignoring
...
with Cachegrind/Callgrind

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11811

15 years agoTeach cachegrind/callgrind how to parse the cache description
Tom Hughes [Fri, 10 Jun 2011 15:04:22 +0000 (15:04 +0000)] 
Teach cachegrind/callgrind how to parse the cache description
in the CPUID data on recent Intel processors.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11810

15 years agoUse the precomputed sets_min_1 value consistently when masking
Tom Hughes [Thu, 9 Jun 2011 12:26:42 +0000 (12:26 +0000)] 
Use the precomputed sets_min_1 value consistently when masking
off bits from an address to find which cache set it is in.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11809

15 years agoFix perf_event open on s390.
Tom Hughes [Wed, 8 Jun 2011 20:55:29 +0000 (20:55 +0000)] 
Fix perf_event open on s390.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11808

15 years agoFix some warnings I introduced in r11804.
Tom Hughes [Wed, 8 Jun 2011 09:57:54 +0000 (09:57 +0000)] 
Fix some warnings I introduced in r11804.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11807

15 years agoAdd support for prlimit64 on x86 and amd64.
Tom Hughes [Wed, 8 Jun 2011 09:55:54 +0000 (09:55 +0000)] 
Add support for prlimit64 on x86 and amd64.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11806

15 years agoUpdate system call lists to match current kernel source.
Tom Hughes [Wed, 8 Jun 2011 09:12:07 +0000 (09:12 +0000)] 
Update system call lists to match current kernel source.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11805

15 years agoIt seems that the perf_counter_open system call was renamed to
Tom Hughes [Wed, 8 Jun 2011 09:10:40 +0000 (09:10 +0000)] 
It seems that the perf_counter_open system call was renamed to
perf_event_open some time after we added it, so correct the name
wherever it appears to match the current kernel source.

Also fixup the PRE handler to do the check correctly, using the
size field of the structure to work out how much data there is.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11804

15 years agoAdd a simple but (to me, at least) useful thing, if (0)'d by default,
Julian Seward [Tue, 7 Jun 2011 22:54:32 +0000 (22:54 +0000)] 
Add a simple but (to me, at least) useful thing, if (0)'d by default,
to print a line of text approximately every 20 million SBs.  This is
useful for monitoring the progress of long running programs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11803

15 years agoDefine _GNU_SOURCE for access to CLONE_XXX flags with gibc 2.14 headers.
Tom Hughes [Tue, 7 Jun 2011 22:53:21 +0000 (22:53 +0000)] 
Define _GNU_SOURCE for access to CLONE_XXX flags with gibc 2.14 headers.

Based on patch from Dmitry Djachenko <dimhen@gmail.com>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11802

15 years agoFix the computation of debuginfo bias values, in the case where the
Julian Seward [Tue, 7 Jun 2011 22:44:09 +0000 (22:44 +0000)] 
Fix the computation of debuginfo bias values, in the case where the
debuginfo object has been not been prelinked but the main object has.
Fixes a segfault observed running any C++ application (eg,
drd/tests/annotate_smart_pointer) on Fedora 14 (32-bit), when the
debuginfo RPM for libstdc++ is installed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11801

15 years agoAdd glibc 2.14 support. Patch from Dmitry Djachenko <dimhen@gmail.com>.
Tom Hughes [Tue, 7 Jun 2011 21:52:26 +0000 (21:52 +0000)] 
Add glibc 2.14 support. Patch from Dmitry Djachenko <dimhen@gmail.com>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11800

15 years agofind_nsegment_idx: double size of the lookup cache in an attempt
Julian Seward [Tue, 7 Jun 2011 21:42:07 +0000 (21:42 +0000)] 
find_nsegment_idx: double size of the lookup cache in an attempt
to mitigate the probable increase in miss rates resulting from
r11798 (which causes increased numbers of such queries).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11799

15 years agoAdd a fourth --smc-check= variant, --smc-check=all-non-file. This
Julian Seward [Tue, 7 Jun 2011 21:39:28 +0000 (21:39 +0000)] 
Add a fourth --smc-check= variant, --smc-check=all-non-file.  This
adds self-modifying-code checks to all guest code taken from mappings
which are not file backed, but omits checks in code from file backed
mappings.  This has the effect of giving complete smc-coverage of JIT
generated code -- since that is invariably generated into anonymous
mapped areas -- without burdening non-JIT generated code with such
checks.  Running Firefox 6, --smc-check=all-non-file reduces by a
factor of between 3 and 10 the number of translations requiring a self
check, compared to --smc-check=all.  These changes depend on the vex
interface changes in r2158.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11798

15 years agoChange the interface to LibVEX_Translate slightly, so as to make the
Julian Seward [Tue, 7 Jun 2011 21:28:38 +0000 (21:28 +0000)] 
Change the interface to LibVEX_Translate slightly, so as to make the
generation of self-modifying-code checks more flexible.  With this
change, the decision about which parts (extents) of the newly created
IRSB need self-checks is deferred until after the IRSB has been
created.  This allows the caller to decide, for each extent
individually, whether it needs a self-check, and the caller can make
those decisions based on the addresses of the guest instructions in
the extents.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2158

15 years agoAdd some more spec rules, for performance purposes:
Julian Seward [Mon, 6 Jun 2011 10:17:46 +0000 (10:17 +0000)] 
Add some more spec rules, for performance purposes:
* S and NS after LOGICL
* BE after SUBB
* B after SUBL

git-svn-id: svn://svn.valgrind.org/vex/trunk@2157

15 years agoImprovements to code generation for 32 bit instructions. When
Julian Seward [Sun, 5 Jun 2011 17:56:03 +0000 (17:56 +0000)] 
Improvements to code generation for 32 bit instructions.  When
appropriate, generate 32 bit add/sub/and/or/xor/cmp, so as to avoid a
bunch of cases where previously values would have been widened to 64
bits, or shifted left 32 bits, before being used.  Reduces the size of
the generated code by up to 2.8%.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2156

15 years agoMention the "3.x" Linux kernel version explicitly in the kernel version configure...
Bart Van Assche [Sun, 5 Jun 2011 10:01:48 +0000 (10:01 +0000)] 
Mention the "3.x" Linux kernel version explicitly in the kernel version configure message

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11797

15 years agoMake Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official
Bart Van Assche [Sun, 5 Jun 2011 08:51:47 +0000 (08:51 +0000)] 
Make Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official
statement that the Linux kernel 3.0 API and ABI is compatible with Linux kernel
2.6 can be found here: http://lkml.org/lkml/2011/5/29/204.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11796

15 years agoFollowup fix to r11794 (generalise processing of PT_LOAD entries):
Julian Seward [Fri, 3 Jun 2011 23:27:39 +0000 (23:27 +0000)] 
Followup fix to r11794 (generalise processing of PT_LOAD entries):
change some incorrect "rx->bias" (which due to lameness of C's type
system was valid) to "inrx->bias".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11795

15 years agoML_(read_elf_debug_info): when processing PT_LOAD entries from the
Julian Seward [Thu, 2 Jun 2011 10:06:25 +0000 (10:06 +0000)] 
ML_(read_elf_debug_info): when processing PT_LOAD entries from the
program header, don't make the following assumptions

- that there is only one r-x and one rw- entry

- that the r-x entry appears before the rw- entry

This makes it possible to handle ELF objects processed by Mike
Hommey's elfhack program.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11794

15 years agoOn arm-linux, give gcc "-mcpu=cortex-a8" so as to persuade it to
Julian Seward [Tue, 31 May 2011 07:17:54 +0000 (07:17 +0000)] 
On arm-linux, give gcc "-mcpu=cortex-a8" so as to persuade it to
accept the armv6t2 (I think) insns (movt, movw) in
dispatch-arm-linux.S.  Some older gccs apparently think they are
compiling for armv6 by default and reject them (gcc 4.4.1 on Ubuntu
9.10, for one.)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11793

15 years agoAdd file missing from r11791 due to insufficient coffee.
Julian Seward [Tue, 31 May 2011 07:14:42 +0000 (07:14 +0000)] 
Add file missing from r11791 due to insufficient coffee.
#214909 c 101.  (Philippe Waroquiers, philippe.waroquiers@skynet.be)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11792

15 years agoMore gdbserver test fixes, from #214909 c 101:
Julian Seward [Tue, 31 May 2011 07:09:06 +0000 (07:09 +0000)] 
More gdbserver test fixes, from #214909 c 101:
fix mcsig(no)pass on arm Ubuntu10, arm thumb internal doc, improve
simulate_control_c

* new file docs/internals/arm_thumb_notes_gdbserver.txt
  documentation about the subtilities of the thumb bit handling in gdbsrv.
* made the SIGFPE backtrace filtering less dependent on gdb/os/libc/...
* improved simulate_control_c : runs faster/less dependent on timeout value

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11791

15 years agoHandle ELF objects with two .eh_frame sections. This fixes a problem
Julian Seward [Mon, 30 May 2011 10:18:59 +0000 (10:18 +0000)] 
Handle ELF objects with two .eh_frame sections.  This fixes a problem
handling libxul.so when linked by gold on x86_64.  (n-i-bz)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11790

15 years agoUn-break all non x86/amd64 targets following r11786, duh.
Julian Seward [Mon, 30 May 2011 06:29:39 +0000 (06:29 +0000)] 
Un-break all non x86/amd64 targets following r11786, duh.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11789

15 years agoUn-break Darwin build following r2155/r11786 -- use dual-entry
Julian Seward [Sun, 29 May 2011 12:40:27 +0000 (12:40 +0000)] 
Un-break Darwin build following r2155/r11786 -- use dual-entry
dispatchers for x86 and amd64, and add corresponding improvements.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11788

15 years agoRemove a load from the s390x dispatcher loop, as per r11781.
Julian Seward [Sun, 29 May 2011 09:38:58 +0000 (09:38 +0000)] 
Remove a load from the s390x dispatcher loop, as per r11781.
(Florian Krohm <britzel@acm.org>).  #274378.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11787

15 years agoGive the amd64-linux and x86-linux dispatchers two entry points, not one,
Julian Seward [Sun, 29 May 2011 09:34:30 +0000 (09:34 +0000)] 
Give the amd64-linux and x86-linux dispatchers two entry points, not one,
so as to avoid a GSP-changed check in the common case.  See vex r2155.
(amd64-darwin and x86-darwin are now temporarily unbuildable.)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11786

15 years agox86 and amd64 back ends: when generating transfers back to the
Julian Seward [Sun, 29 May 2011 09:29:18 +0000 (09:29 +0000)] 
x86 and amd64 back ends: when generating transfers back to the
dispatcher, generate a jump either to the unassisted (GSP unchanged,
the common case) or assisted (GSP changed, request some action before
continuing) dispatcher.  This removes two instructions per dispatch
for the common case.  Changes for all other targets are interface-only
changes due to change in type of the emit_XXInstr functions.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2155

15 years agodispatch-x86-linux.S:
Julian Seward [Sat, 28 May 2011 17:07:53 +0000 (17:07 +0000)] 
dispatch-x86-linux.S:
   use test-based detection of GSP pointer changes.
   Saves one load per SB.

dispatch-amd64-linux.S:
   ditto

dispatch-amd64-linux.S:
   use movabsq to get &VG_(tt_fast) into a register,
   instead of an rsp-relative load from a constant pool.
   Saves a second load per SB.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11785

15 years agoUndo bogus comment changes committed in r11783.
Julian Seward [Sat, 28 May 2011 16:58:45 +0000 (16:58 +0000)] 
Undo bogus comment changes committed in r11783.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11784

15 years agoTest for guest-state-pointer changes by checking its lowest bit.
Julian Seward [Sat, 28 May 2011 15:58:13 +0000 (15:58 +0000)] 
Test for guest-state-pointer changes by checking its lowest bit.
Removes one memory reference from the dispatcher loop.  As per r11781
for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11783

15 years agoFix ppc64-linux build following introduction of IRStmt_Mark::delta
Julian Seward [Sat, 28 May 2011 15:34:17 +0000 (15:34 +0000)] 
Fix ppc64-linux build following introduction of IRStmt_Mark::delta
in vex r2153.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11782

15 years agoComment-only change.
Julian Seward [Sat, 28 May 2011 11:06:14 +0000 (11:06 +0000)] 
Comment-only change.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2154

15 years agoRemove another memory reference from the arm dispatcher loop, by using
Julian Seward [Sat, 28 May 2011 11:05:44 +0000 (11:05 +0000)] 
Remove another memory reference from the arm dispatcher loop, by using
the fact that all {VG,VEX}_TRC_VALUES have their lowest bit set.  All
other targets can benefit from this trick too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11781

15 years agoGet rid of a bunch of loads in the arm dispatcher inner loops, and
Julian Seward [Sat, 28 May 2011 10:16:58 +0000 (10:16 +0000)] 
Get rid of a bunch of loads in the arm dispatcher inner loops, and
make some attempt to schedule for Cortex-A8.  Improves overall IPC
for none running perf/bz2.c "-O" from 0.879 to 0.925.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11780

15 years agoFurther fixes for GDB server on Thumb code:
Julian Seward [Fri, 27 May 2011 13:23:44 +0000 (13:23 +0000)] 
Further fixes for GDB server on Thumb code:

* Disabled several tests on ARM when gdb version < 7.1
  gdb 7.0 has problems with next/step/... in ARM thumb code.

* Documented in manual-core.xml that ARM thumb code implies
  a gdb version >= 7.1

* m_gdbserver.h/.c : take into account the thumb bit at several places

* use new IRStmt_IMark::delta field to distinguish ARM vs Thumb
  instructions as committed in vex r2153

Patch from bug 214909 comment 99 (valgrind part).
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11779

15 years agoAdd a field 'UChar delta' to IRStmt_IMark, and use it to carry around
Julian Seward [Fri, 27 May 2011 13:20:56 +0000 (13:20 +0000)] 
Add a field 'UChar delta' to IRStmt_IMark, and use it to carry around
the T bit for the instruction when the instruction is a ARM/Thumb.
This more or less avoids introducing Thumb specific hacks in the IR,
yet makes it possible to identify, from an IMark, whether it refers to
a Thumb or ARM instruction.  This is important for the GDB server
integration to work properly on Thumb code.

Patch from bug 214909 comment 99 (vex part).
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2153