From: Julian Seward Date: Thu, 19 Sep 2013 10:15:22 +0000 (+0000) Subject: Double the size of the (already huge) translation cache on all X-Git-Tag: svn/VALGRIND_3_9_0~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c65d636daedc190b45ec66c275f2ed2c2a54f55;p=thirdparty%2Fvalgrind.git Double the size of the (already huge) translation cache on all non-phone/tablet targets. The previous apparently-huge sizing is evidently not huge enough for recent apps, eg, recent Firefox requires circa 350k translations to get started and almost fills an 8-sector cache merely starting up and then idling. On Android targets, fall back to 6 sectors; space is critical. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13568 --- diff --git a/coregrind/m_transtab.c b/coregrind/m_transtab.c index 566847ce89..c27f7b7a47 100644 --- a/coregrind/m_transtab.c +++ b/coregrind/m_transtab.c @@ -56,8 +56,16 @@ /*------------------ CONSTANTS ------------------*/ /* Number of sectors the TC is divided into. If you need a larger - overall translation cache, increase this value. */ -#define N_SECTORS 8 + overall translation cache, increase this value. On Android, space + is limited, so try to get by with fewer sectors. On other + platforms we can go to town. 16 sectors gives theoretical capacity + of about 440MB of JITted code in 1.05 million translations + (realistically, about 2/3 of that) for Memcheck. */ +#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android) +# define N_SECTORS 6 +#else +# define N_SECTORS 16 +#endif /* Number of TC entries in each sector. This needs to be a prime number to work properly, it must be <= 65535 (so that a TT index