scan_dependent_handles(condemned_gen_number, &sc, false);
#ifdef MULTIPLE_HEAPS
+ static VOLATILE(int32_t) syncblock_scan_p;
dprintf(3, ("Joining for weak pointer deletion"));
gc_t_join.join(this, gc_join_null_dead_long_weak);
if (gc_t_join.joined())
{
dprintf(3, ("Starting all gc thread for weak pointer deletion"));
+ syncblock_scan_p = 0;
gc_t_join.restart();
}
#endif //MULTIPLE_HEAPS
// unsigned long start = GetCycleCount32();
sort_mark_list();
// printf("sort_mark_list took %u cycles\n", GetCycleCount32() - start);
+ // first thread to finish sorting will scan the sync syncblk cache
+ if ((syncblock_scan_p == 0) && (Interlocked::Increment(&syncblock_scan_p) == 1))
#endif //PARALLEL_MARK_LIST_SORT
#endif //MARK_LIST
-
+#endif //MULTIPLE_HEAPS
+ {
+ // scan for deleted entries in the syncblk cache
+ GCScan::GcWeakPtrScanBySingleThread(condemned_gen_number, max_generation, &sc);
+ }
+#ifdef MULTIPLE_HEAPS
dprintf (3, ("Joining for sync block cache entry scanning"));
gc_t_join.join(this, gc_join_null_dead_syncblk);
if (gc_t_join.joined())
#endif //MULTIPLE_HEAPS
{
- // scan for deleted entries in the syncblk cache
- GCScan::GcWeakPtrScanBySingleThread (condemned_gen_number, max_generation, &sc);
-
#ifdef MULTIPLE_HEAPS
#if defined(MARK_LIST) && !defined(PARALLEL_MARK_LIST_SORT)
//compact g_mark_list and sort it.