|
From: Julian S. <js...@ac...> - 2014-02-06 13:58:28
|
In order to emulate architectures that have hardware D-I cache
coherency and hence support self-modifying code, Valgrind can
generate "self checking" translations. However, these are
expensive to run, so the default setting is only to generate them
for code taken from thread stacks:
--smc-check=none|stack|all|all-non-file [stack]
checks for self-modifying code: none, only for
code found in stacks, for all code, or for all
code except that from file-backed mappings
For running applications with JITs, --smc-check=all-non-file is
needed. This generates checks for translations taken from non-file-backed
mappings. Normal AOT-compiled code exists in file-backed mappings
and so is unaffected.
I propose to change the default value to all-non-file for x86, amd64
and s390. This should remove a common source of mysterious failures
for people debugging apps containing JITs on those targets. All other
targets require manual invalidation (arm, ppc, mips) and V intercepts
and honours those, so JITs are transparently supported without the
need to generate self-checking translations.
Comments, objections?
J
|
|
From: Christian B. <bor...@de...> - 2014-02-06 14:08:01
|
On 06/02/14 14:33, Julian Seward wrote: > > In order to emulate architectures that have hardware D-I cache > coherency and hence support self-modifying code, Valgrind can > generate "self checking" translations. However, these are > expensive to run, so the default setting is only to generate them > for code taken from thread stacks: > > --smc-check=none|stack|all|all-non-file [stack] > checks for self-modifying code: none, only for > code found in stacks, for all code, or for all > code except that from file-backed mappings > > For running applications with JITs, --smc-check=all-non-file is > needed. This generates checks for translations taken from non-file-backed > mappings. Normal AOT-compiled code exists in file-backed mappings > and so is unaffected. > > I propose to change the default value to all-non-file for x86, amd64 > and s390. This should remove a common source of mysterious failures > for people debugging apps containing JITs on those targets. All other > targets require manual invalidation (arm, ppc, mips) and V intercepts > and honours those, so JITs are transparently supported without the > need to generate self-checking translations. > > Comments, objections? Lets give it a try. The nightly runs for s390 also have a stripped down performance run, so we will see if we forgot some corner case. Christian |
|
From: Tom H. <to...@co...> - 2014-02-06 14:17:17
|
On 06/02/14 13:33, Julian Seward wrote: > I propose to change the default value to all-non-file for x86, amd64 > and s390. This should remove a common source of mysterious failures > for people debugging apps containing JITs on those targets. All other > targets require manual invalidation (arm, ppc, mips) and V intercepts > and honours those, so JITs are transparently supported without the > need to generate self-checking translations. Sounds good to me - the cost should be low because it only triggers when you're running code from an anonymous mapping. And if you're doing that then you probably need it set anyway! Tom -- Tom Hughes (to...@co...) http://compton.nu/ |