]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Enable chasing of unconditional jumps/calls for s390x.
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 16 Jul 2011 02:09:36 +0000 (02:09 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 16 Jul 2011 02:09:36 +0000 (02:09 +0000)
Tune function chase_into_ok to not chase into EX/EXRL
insn.
Observed speedups on performance tests were:
none      -6% ... -12%
memcheck  -3% ... -8%

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

coregrind/m_translate.c

index 3130927329ee0ec21c48d6ccf752a3ba8f85e309..894c8d41390c6b4aac80048c8691c732f6bf06be 100644 (file)
@@ -842,6 +842,18 @@ static Bool chase_into_ok ( void* closureV, Addr64 addr64 )
    if (addr == TRANSTAB_BOGUS_GUEST_ADDR)
       goto dontchase;
 
+#  if defined(VGA_s390x)
+   /* Never chase into an EX instruction. Generating IR for EX causes
+      a round-trip through the scheduler including VG_(discard_translations).
+      And that's expensive as shown by perf/tinycc.c:
+      Chasing into EX increases the number of EX translations from 21 to
+      102666 causing a 7x runtime increase for "none" and a 3.2x runtime
+      increase for memcheck. */
+   if (((UChar *)ULong_to_Ptr(addr))[0] == 0x44 ||   /* EX */
+       ((UChar *)ULong_to_Ptr(addr))[0] == 0xC6)     /* EXRL */
+     goto dontchase;
+#  endif
+
    /* well, ok then.  go on and chase. */
    return True;