RFR(S) 8038405: Clean up some virtual fucntions in Space class hierarchy
Mikael Gerdin
mikael.gerdin at oracle.com
Mon Mar 31 08:22:44 UTC 2014
On Thursday 27 March 2014 16.18.29 Mikael Gerdin wrote:
> Hi,
>
> On Wednesday 26 March 2014 17.22.03 Mikael Gerdin wrote:
> > Hi,
> >
> > I'm doing some cleanups in the "Space" classes to simplify the code for
> > the
> > G1 class unloading work[1].
> > This change moves around some virtual functions in Space to more (in my
> > mind) sane places:
> >
> > * Space::is_in is implemented the same by all Space subclasses, move it to
> > Space and make it non-virtual.
> > * Space::used_region has a bogus implementation that is never useful,
> > remove it.
> > * Consolidate more code related to saved_marks in the Space base class
>
> When making set_saved_mark non-virtual G1OffsetTableContigSpace's override
> of set_saved_mark became a shadowing function instead. The code still works
> fine since all calls to G1OffsetTableContigSpace::set_saved_mark are on
> pointers to HeapRegion and not the base class.
>
> To clarify that G1 uses the "saved_mark" functionality for a completely
> different purpose I have renamed the G1 function to
> record_top_and_timestamp:
>
> Incremental webrev:
> http://cr.openjdk.java.net/~mgerdin/8038405/webrev.0.to.1 Webrev:
> http://cr.openjdk.java.net/~mgerdin/8038405/webrev.1
Sorry guys, I managed to mess up my patches so I missed these changes in the
push. I'll file a follow-up rfe and push them separate.
/Mikael
>
> /Mikael
>
> > * Make CompactibleSpace::reset_after_compaction a pure virtual.
> > * Give Space::minimum_free_block_size a default implementation since only
> > CMS needs to override it.
> >
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8038405
> > Webrev: http://cr.openjdk.java.net/~mgerdin/8038405/webrev.0
> >
> > /Mikael
> >
> > [1] http://openjdk.java.net/jeps/156
More information about the hotspot-gc-dev
mailing list