comparison src/share/vm/memory/genCollectedHeap.hpp @ 3293:1f4413413144

7039089: G1: changeset for 7037276 broke heap verification, and related cleanups Summary: 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
author ysr
date Tue, 26 Apr 2011 21:17:24 -0700
parents 6cd6d394f280
children 2aa9ddbb9e60
comparison
equal deleted inserted replaced
3292:c303b3532d4a 3293:1f4413413144
425 // not scanned as roots; in this case, the caller must be arranging to 425 // not scanned as roots; in this case, the caller must be arranging to
426 // scan the younger generations itself. (For example, a generation might 426 // scan the younger generations itself. (For example, a generation might
427 // explicitly mark reachable objects in younger generations, to avoid 427 // explicitly mark reachable objects in younger generations, to avoid
428 // excess storage retention.) If "collecting_perm_gen" is false, then 428 // excess storage retention.) If "collecting_perm_gen" is false, then
429 // roots that may only contain references to permGen objects are not 429 // roots that may only contain references to permGen objects are not
430 // scanned. The "so" argument determines which of the roots 430 // scanned; instead, the older_gens closure is applied to all outgoing
431 // references in the perm gen. The "so" argument determines which of the roots
431 // the closure is applied to: 432 // the closure is applied to:
432 // "SO_None" does none; 433 // "SO_None" does none;
433 // "SO_AllClasses" applies the closure to all entries in the SystemDictionary; 434 // "SO_AllClasses" applies the closure to all entries in the SystemDictionary;
434 // "SO_SystemClasses" to all the "system" classes and loaders; 435 // "SO_SystemClasses" to all the "system" classes and loaders;
435 // "SO_Symbols_and_Strings" applies the closure to all entries in 436 // "SO_Strings" applies the closure to all entries in the StringTable.
436 // SymbolsTable and StringTable.
437 void gen_process_strong_roots(int level, 437 void gen_process_strong_roots(int level,
438 bool younger_gens_as_roots, 438 bool younger_gens_as_roots,
439 // The remaining arguments are in an order 439 // The remaining arguments are in an order
440 // consistent with SharedHeap::process_strong_roots: 440 // consistent with SharedHeap::process_strong_roots:
441 bool activate_scope, 441 bool activate_scope,