|
From: <sv...@va...> - 2013-01-17 23:57:49
|
philippe 2013-01-17 23:57:35 +0000 (Thu, 17 Jan 2013)
New Revision: 13237
Log:
Change the size of the hash table used to cache IP -> debuginfo to a prime nr
This change is based on rumours/legends/oral transmission of experience/...
that prime nrs are good to use for hash table size :).
If someone has a (short) explanation about why this is useful,
that will be welcome.
Modified files:
trunk/coregrind/m_debuginfo/debuginfo.c
Modified: trunk/coregrind/m_debuginfo/debuginfo.c (+2 -1)
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2013-01-17 14:24:35 +00:00 (rev 13236)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2013-01-17 23:57:35 +00:00 (rev 13237)
@@ -2245,7 +2245,8 @@
records are added all at once, when the debuginfo for an object is
read, and is not changed ever thereafter. */
-#define N_CFSI_CACHE 511
+// Prime number, giving about 3K cache on 32 bits, 6K cache on 64 bits.
+#define N_CFSI_CACHE 509
typedef
struct { Addr ip; DebugInfo* di; Word ix; }
|