src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp

Print this page
rev 4736 : 8015422: Large performance hit when the StringTable is walked twice in Parallel Scavenge
Summary: Combine the calls to StringTable::unlink and StringTable::oops_do in Parallel Scavenge.
Reviewed-by: TBD1, TBD2

@@ -447,15 +447,13 @@
       reference_processor()->enqueue_discovered_references(&task_executor);
     } else {
       reference_processor()->enqueue_discovered_references(NULL);
     }
 
-      // Unlink any dead interned Strings
-      StringTable::unlink(&_is_alive_closure);
-      // Process the remaining live ones
+    // Unlink any dead interned Strings and process the remaining live ones.
       PSScavengeRootsClosure root_closure(promotion_manager);
-      StringTable::oops_do(&root_closure);
+    StringTable::unlink(&_is_alive_closure, &root_closure);
 
     // Finally, flush the promotion_manager's labs, and deallocate its stacks.
     PSPromotionManager::post_scavenge();
 
     promotion_failure_occurred = promotion_failed();