# HG changeset patch # User Christos Kotselidis # Date 1375443313 -7200 # Node ID d85bdcb38fa2c34792480b36fd12eec31961a387 # Parent f22cbff51c120ce88411659551b4ee6e88dbe797 Apply patch by Mikael Gerdin which fixes filtered strong marking of nmethods diff -r f22cbff51c12 -r d85bdcb38fa2 src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Aug 02 13:31:31 2013 +0200 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Aug 02 13:35:13 2013 +0200 @@ -5127,12 +5127,20 @@ // Walk the code cache w/o buffering, because StarTask cannot handle // unaligned oop locations. - G1FilteredCodeBlobToOopClosure eager_scan_code_roots(this, scan_non_heap_roots); + G1FilteredCodeBlobToOopClosure eager_scan_cs_code_roots(this, scan_non_heap_roots); + + // Scan all code roots from stack + CodeBlobToOopClosure eager_scan_all_code_roots(scan_non_heap_roots, true); + CodeBlobToOopClosure* blobs = &eager_scan_cs_code_roots; + if (UseNewCode && g1_policy()->during_initial_mark_pause()) { + // during initial-mark we need to take care to follow all code roots + blobs = &eager_scan_all_code_roots; + } process_strong_roots(false, // no scoping; this is parallel code is_scavenging, so, &buf_scan_non_heap_roots, - &eager_scan_code_roots, + blobs, scan_klasses );