29 Commits

Author SHA1 Message Date
Julian Seward
b519f73307 Adds initial support for AArch64 (arm64) on Android. Small programs
(/system/bin/ls, /system/bin/date) run.  Still to do:

* enable more malloc/free intercepts

* enable wrappers for ashmem and binder syscalls

* check to see if any special ioctl support is required for ARM Mali GPUs



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14690
2014-11-04 17:44:21 +00:00
Florian Krohm
a3a57c92df Constify coregrind.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14656
2014-10-22 22:25:30 +00:00
Florian Krohm
9eb0cdb015 Entangle header files a bit. Specifically, pub_core_basics.h no longer
includes libvex.h. It isn't needed to successfully compile pub_core_basics.h
standalone and the declarations libvex.h provides aren't used as broadly as
the comment in the code implied. 
Move the guest-specific includes and some ifdeffery to the new file
pub_core_guest.h
For the curious reader: The change above avoids a problem when linking the
linux-launcher which previously included libvex.h indirectly. libvex.h also
defines the inline function LibVEX_Alloc which, when emitted, causes the
link step to fail due to unresoled references (as the launcher does not link
against libvex.a). See also BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14600
2014-10-06 16:41:14 +00:00
Julian Seward
e05579cd67 Track vex r2910 (infrastructural improvements in representation of
endianness in VEX).

In short: in m_machine.c, VG_(machine_get_hwcaps), get the endianness
of the host, and pass it through to all places (in VEX) where it is
required.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14184
2014-07-24 12:45:24 +00:00
Julian Seward
dbf9b63605 Update copyright dates (20XY-2012 ==> 20XY-2013)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658
2013-10-18 14:27:36 +00:00
Julian Seward
ab319a7e24 Followup to r13652 (make the translation cache size be command-line
controllable): reduce MAX_N_SECTORS to 24, speed up Sector
initialisation, wording tweaks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13655
2013-10-18 11:18:45 +00:00
Philippe Waroquiers
61b8b9617b Allow the user to dimension the translation cache
A previous commit had decreased to 6 (on android) and increased to 16
(other platforms) the nr of sectors in the translation cache.
This patch adds a command line option to let the user specify
the nr of sectors as e.g. 16 sectors might be a lot and cause
an out of memory for some workloads or might be too small for
huge executable or executables using a lot of shared libs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13652
2013-10-18 00:08:20 +00:00
Julian Seward
415490d305 Improvements to the built-in profiling infrastructure:
--profile-flags=00000000 now prints summary statistics, one line per
profiled block, but with no translation details.  Previously it had
no effect.

--profile-interval=<number> is a new flag that causes the profile data
to be dumped and zeroed every <number> event checks.  This makes it
possible to get profile data without waiting for runs to end, and to
get profile data which depends on the current workload etc.  If
--profile-interval=0 or is unset, the profile is printed only once, at
the end of the run, as before.

--profile-flags=XXXXXXXX (for at least one nonzero X) prints the
summary lines both at the start and end of the profile, so you don't
have to scroll back up to the top to see the summary.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13213
2012-12-28 09:12:14 +00:00
Florian Krohm
117196ac6d Char/HChar fixups for m_debuginfo and m_gdbserver.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13122
2012-11-15 04:27:04 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Julian Seward
bd9f3bb750 For --profile-flags=, weight the counts by the number of guest insns
in each IRSB, rather than considering each IRSB to have a weight of 1.
This probably gives more representative profiles, especially post
t-chain merge, which made inter-SB transitions more or less free
compared to what they were before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12542
2012-04-24 11:50:49 +00:00
Philippe Waroquiers
356c41be65 TCHAIN: remove caused_discard* argument to VG_(translate)
This is the followup to rev 12488.
With this revision, translation chaining is not done
if the translation with 'from address' is not existing
anymore (discarded or erased).
The assumption documented in 12488 comment has been checked by:
  * first reproduce a crash in Firefox when always setting
    caused discard to False
  * then upgrade to rev 12488
  * with this upgrade, no crash anymore.
=> this verifies that the caused discard logic is properly
replaced by revision 12488.

So, the caused discard logic can be removed.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12492
2012-04-05 22:44:36 +00:00
Julian Seward
8b6f93641c Add translation chaining support for amd64, x86 and ARM
(Valgrind side).  See #296422.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12484
2012-04-02 21:56:03 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +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
5aac956e64 Remove a number of unused parameters, found with -Wunused-parameter.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9248
2009-02-24 03:07:37 +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
Julian Seward
79f854bc29 Redo the dispatcher's fast-cache mechanism (VG_(tt_fast) et al) to be
more cache friendly.  This changes the mechanism from being a table of
pointers to (guest address, translated code pairs) to being a table of
pairs (guest address, pointer to translated code).  The effect ranges
from zero up to about 20% performance improvement on memcheck, the
biggest effects being seen for programs which jump around a large
number of blocks of code and whose data set does not fit in L2.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6582
2007-02-11 05:08:06 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Julian Seward
f9a9e03c7a Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive.  This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5520
2006-01-12 12:32:32 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Julian Seward
88812ea1fc Make VG_(discard_translations) 64-bit clean. As JosefW points out, it
doesn't make much sense to have a 64-bit base address but only a
32-bit length.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4273
2005-07-26 23:04:25 +00:00
Julian Seward
50773ee7a1 Support for self modifying code on unfriendly platforms (x86, amd64)
via the use of self-checking translations.  (Friendly platforms which
have icache-invalidation instructions we can observe, such as ppc32,
are already handled correctly.)  This should finally fix the
longstanding problem of V incorrectly handling calls of statically
nested functions (a gcc extension), and more generally make it a lot
easier to use V to debug dynamic code generation systems.

Since self-checking is a large performance overhead, there is some
control via a command line flag:

   --smc-support=none 

      Don't make any translations self-checking.

   --smc-support=stack

      Add checking code for translations taken from segments which
      have the SF_GROWDOWN flag set -- stacks, basically.
      This is the default.  It should make gcc nested functions and
      GNU Ada work correctly with no intervention from the user.

   --smc-support=all

      Make all translations self-checking.  This is expensive and 
      you want to do this if you're debugging a JIT compiler or
      some such.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4122
2005-07-07 10:05:05 +00:00
Nicholas Nethercote
1474691624 Break up VG_(show_BB_profile)(), and move half of it into m_main. This
removes m_transtab's dependence on m_translate (breaking a circular
dependence) and m_debuginfo, hooray.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4035
2005-06-26 20:44:48 +00:00
Nicholas Nethercote
7f2ab70714 Remove empty sanity check function. And clean up sanity checking in
m_scheduler a little.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4033
2005-06-26 17:26:22 +00:00
Nicholas Nethercote
8e0e03d480 Created pub_core_transtab_asm.h, killing core_asm.h in the process.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3711
2005-05-14 21:44:20 +00:00
Nicholas Nethercote
648e4fade2 Modularised vg_transtab.c as m_transtab.
Renamed add_to_trans_tab() as add_to_transtab() for consistency
with the other names.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3703
2005-05-13 23:40:55 +00:00