src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 4735 : 8015237: Parallelize string table scanning during strong root processing
Summary: Parallelize the scanning of the intern string table by having each GC worker claim a given number of buckets.
Reviewed-by:

@@ -3311,12 +3311,11 @@
                          false,     // we set "is scavenging" to false,
                                     // so we don't reset the dirty cards.
                          ScanningOption(so),  // roots scanning options
                          &rootsCl,
                          &blobsCl,
-                         &klassCl
-                         );
+                         &klassCl);
 
     bool failures = rootsCl.failures();
 
     if (vo != VerifyOption_G1UseMarkWord) {
       // If we're verifying during a full GC then the region sets

@@ -5010,11 +5009,11 @@
 g1_process_strong_roots(bool is_scavenging,
                         ScanningOption so,
                         OopClosure* scan_non_heap_roots,
                         OopsInHeapRegionClosure* scan_rs,
                         G1KlassScanClosure* scan_klasses,
-                        int worker_i) {
+                        uint worker_i) {
 
   // First scan the strong roots
   double ext_roots_start = os::elapsedTime();
   double closure_app_time_sec = 0.0;
 

@@ -5023,15 +5022,16 @@
   // Walk the code cache w/o buffering, because StarTask cannot handle
   // unaligned oop locations.
   G1FilteredCodeBlobToOopClosure eager_scan_code_roots(this, scan_non_heap_roots);
 
   process_strong_roots(false, // no scoping; this is parallel code
-                       is_scavenging, so,
+                       is_scavenging,
+                       so,
                        &buf_scan_non_heap_roots,
                        &eager_scan_code_roots,
-                       scan_klasses
-                       );
+                       scan_klasses,
+                       worker_i);
 
   // Now the CM ref_processor roots.
   if (!_process_strong_tasks->is_task_claimed(G1H_PS_refProcessor_oops_do)) {
     // We need to treat the discovered reference lists of the
     // concurrent mark ref processor as roots and keep entries