--- old/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-02-07 14:16:16.551805116 +0100 +++ new/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-02-07 14:16:16.435805111 +0100 @@ -5107,7 +5107,7 @@ assert(so & SO_AllCodeCache || scan_rs != NULL, "must scan code roots somehow"); // Walk the code cache/strong code roots w/o buffering, because StarTask // cannot handle unaligned oop locations. - CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, true /* do_marking */); + CodeBlobToOopClosure eager_scan_code_roots(&buf_scan_non_heap_roots, true /* do_marking */); process_strong_roots(false, // no scoping; this is parallel code so, @@ -5168,6 +5168,7 @@ // Now scan the complement of the collection set. if (scan_rs != NULL) { g1_rem_set()->oops_into_collection_set_do(scan_rs, &eager_scan_code_roots, worker_i); + buf_scan_non_heap_roots.done(); } _process_strong_tasks->all_tasks_completed(); }