Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 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 | 1d1603768966 |
children | 1e3493ac2d11 |
comparison
equal
deleted
inserted
replaced
3292:c303b3532d4a | 3293:1f4413413144 |
---|---|
1961 } | 1961 } |
1962 | 1962 |
1963 // Iteration support, mostly delegated from a CMS generation | 1963 // Iteration support, mostly delegated from a CMS generation |
1964 | 1964 |
1965 void CompactibleFreeListSpace::save_marks() { | 1965 void CompactibleFreeListSpace::save_marks() { |
1966 // mark the "end" of the used space at the time of this call; | 1966 assert(Thread::current()->is_VM_thread(), |
1967 "Global variable should only be set when single-threaded"); | |
1968 // Mark the "end" of the used space at the time of this call; | |
1967 // note, however, that promoted objects from this point | 1969 // note, however, that promoted objects from this point |
1968 // on are tracked in the _promoInfo below. | 1970 // on are tracked in the _promoInfo below. |
1969 set_saved_mark_word(unallocated_block()); | 1971 set_saved_mark_word(unallocated_block()); |
1972 #ifdef ASSERT | |
1973 // Check the sanity of save_marks() etc. | |
1974 MemRegion ur = used_region(); | |
1975 MemRegion urasm = used_region_at_save_marks(); | |
1976 assert(ur.contains(urasm), | |
1977 err_msg(" Error at save_marks(): [" PTR_FORMAT "," PTR_FORMAT ")" | |
1978 " should contain [" PTR_FORMAT "," PTR_FORMAT ")", | |
1979 ur.start(), ur.end(), urasm.start(), urasm.end())); | |
1980 #endif | |
1970 // inform allocator that promotions should be tracked. | 1981 // inform allocator that promotions should be tracked. |
1971 assert(_promoInfo.noPromotions(), "_promoInfo inconsistency"); | 1982 assert(_promoInfo.noPromotions(), "_promoInfo inconsistency"); |
1972 _promoInfo.startTrackingPromotions(); | 1983 _promoInfo.startTrackingPromotions(); |
1973 } | 1984 } |
1974 | 1985 |