RFR: 8047818: G1 HeapRegions can no longer be ContiguousSpaces

Mikael Gerdin mikael.gerdin at oracle.com
Wed Jun 25 11:50:57 UTC 2014


Hi!

On Monday 23 June 2014 16.26.03 Mikael Gerdin wrote:
> Hi!
> 
> When G1 is modified to unload classes without doing full collections the old
> HeapRegions can contain unparseable objects. This makes ContiguousSpace
> unsuitable as a base class for HeapRegion since it assumes that all objects
> below _top are parseable.
> 
> Modify G1OffsetTableContigSpace to implement allocation with a separate _top
> and reimplement some Space pure virtuals to make object iteration work as
> expected.
> 
> This change is the last part of a set of 4 changes: 8047818, 8047819,
> 8047820, 8047821 which are needed to refactor the HeapRegion class and its
> superclasses in order to simplify the G1 class unloading change which is
> coming. This change depends on the 19, 20 and 21 changes.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8047818
> Webrev:
> http://cr.openjdk.java.net/~mgerdin/8047818/webrev/

Based on review comments from Jon, Stefan and Thomas (thanks!) here's a second 
version of this webrev.

A quick summary of the incremental changes:

* SA Support
* taking {par_,}allocate_impl from ContiguousSpace
* fix for building without precompiled headers
* setting _saved_mark_word in clear()
* initialization order problem with _top vs _bottom
* object_iterate block_is_obj check
* added a short specification for block_is_obj and block_size

Note that the set_offset_array change was moved to the 8047820 webrev since 
it's needed to get that change to compile without precompiled headers.

Full webrev:
http://cr.openjdk.java.net/~mgerdin/8047818/webrev.1/

Incremental webrev:
http://cr.openjdk.java.net/~mgerdin/8047818/webrev.0_to_1/

/Mikael

> 
> Notes:
> The moving of set_offset_range is due to an introduced circular dependency
> between g1BlockOffsetTable.inline.hpp and heapRegion.inline.hpp
> 
> Thanks
> /Mikael




More information about the hotspot-gc-dev mailing list