From c5db2d607e92701ad6f83ee0dfad0dc21eb20e58 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 16 Jul 2011 02:09:36 +0000 Subject: [PATCH] Enable chasing of unconditional jumps/calls for s390x. 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c index 3130927329..894c8d4139 100644 --- a/coregrind/m_translate.c +++ b/coregrind/m_translate.c @@ -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; -- 2.47.2