|
From: <sv...@va...> - 2011-07-16 02:14:38
|
Author: florian
Date: 2011-07-16 03:09:36 +0100 (Sat, 16 Jul 2011)
New Revision: 11899
Log:
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%
Modified:
trunk/coregrind/m_translate.c
Modified: trunk/coregrind/m_translate.c
===================================================================
--- trunk/coregrind/m_translate.c 2011-07-13 16:46:18 UTC (rev 11898)
+++ trunk/coregrind/m_translate.c 2011-07-16 02:09:36 UTC (rev 11899)
@@ -842,6 +842,18 @@
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;
|