7039089: G1: changeset for 7037276 broke heap verification, and related cleanups

In G1 heap verification, we no longer scan perm to G1-collected heap refs as part of process_strong_roots() but rather in a separate explicit oop iteration over the perm gen. This preserves the original perm card-marks. Added a new assertion in younger_refs_iterate() to catch a simple subcase where the user may have forgotten a prior save_marks() call, as happened in the case of G1's attempt to iterate perm to G1 refs when verifying the heap before exit. The assert was deliberately weakened for ParNew+CMS and will be fixed for that combination in a future CR. Also made some (non-G1) cleanups related to code and comments obsoleted by the migration of Symbols to the native heap.

Reviewed-by: iveresov, jmasa, tonyp
This commit is contained in:
Y. Srinivas Ramakrishna 2011-04-26 21:17:24 -07:00
parent e3121a5a43
commit d86311b13c
8 changed files with 69 additions and 28 deletions

View file

@ -46,7 +46,6 @@ enum SH_process_strong_roots_tasks {
SH_PS_Management_oops_do,
SH_PS_SystemDictionary_oops_do,
SH_PS_jvmti_oops_do,
SH_PS_SymbolTable_oops_do,
SH_PS_StringTable_oops_do,
SH_PS_CodeCache_oops_do,
// Leave this one last.
@ -161,13 +160,9 @@ void SharedHeap::process_strong_roots(bool activate_scope,
if (!_process_strong_tasks->is_task_claimed(SH_PS_SystemDictionary_oops_do)) {
if (so & SO_AllClasses) {
SystemDictionary::oops_do(roots);
} else
if (so & SO_SystemClasses) {
SystemDictionary::always_strong_oops_do(roots);
}
}
if (!_process_strong_tasks->is_task_claimed(SH_PS_SymbolTable_oops_do)) {
} else if (so & SO_SystemClasses) {
SystemDictionary::always_strong_oops_do(roots);
}
}
if (!_process_strong_tasks->is_task_claimed(SH_PS_StringTable_oops_do)) {