|
From: <sv...@va...> - 2015-04-10 19:34:22
|
Author: philippe
Date: Fri Apr 10 20:34:14 2015
New Revision: 15082
Log:
Have the event map GC use the same approach as the other GC
done from libhb_maybe_GC, i.e. check the condition in
libhb_maybe_GC, and call the (non inlined) GC only if
a GC is needed.
Modified:
trunk/helgrind/libhb_core.c
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Fri Apr 10 20:34:14 2015
@@ -4491,7 +4491,7 @@
}
__attribute__((noinline))
-static void event_map_maybe_GC ( void )
+static void event_map_GC ( void )
{
OldRef* oldref;
UWord keyW, valW, retained, maxGen;
@@ -4502,9 +4502,6 @@
UWord genMap_min = 0;
UWord genMap_size = 0;
- if (LIKELY(oldrefTreeN < HG_(clo_conflict_cache_size)))
- return;
-
if (0)
VG_(printf)("libhb: event_map GC at size %lu\n", oldrefTreeN);
@@ -6585,7 +6582,9 @@
void libhb_maybe_GC ( void )
{
- event_map_maybe_GC();
+ if (UNLIKELY(oldrefTreeN >= HG_(clo_conflict_cache_size)))
+ event_map_GC();
+
/* If there are still freelist entries available, no need for a
GC. */
if (vts_tab_freelist != VtsID_INVALID)
|