RFR: 8202639: Use concrete Generation classes in SerialHeap and CMSHeap
Erik Österlund
erik.osterlund at oracle.com
Fri May 4 10:18:19 UTC 2018
Hi Stefan,
Nice!!
Just a small nit... when downcasting the heaps and generations, could
you please use static_cast instead of C-style cast, and have an assert
that checks that the kind is indeed the expected one?
Otherwise, this looks very nice indeed.
Thanks,
/Erik
On 2018-05-04 11:56, Stefan Karlsson wrote:
> Hi all,
>
> Please review this patch to add and use young_gen() and old_gen()
> functions that add returns the concrete Generation classes.
>
> http://cr.openjdk.java.net/~stefank/8202639/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8202639
>
> GenCollectedHeap contains fields for the _young_gen and _old_gen, with
> associated young_gen() and old_gen() accessors. These accessors return
> Generation*s.
>
> These Generations are always DefNewGeneration and TenuredGeneration
> for the Serial GC, and ParNewGeneration and
> ConcurrentMarkSweepGeneration for CMS.
>
> I propose that we expose two new accessors that return the concrete
> Generation classes in SerialHeap and CMSHeap.
>
> Working with these concrete classes will allow us to easier split the
> Serial and CMS code. Specifically, this makes it possible to remove
> ALL_SINCE_SAVE_MARKS_CLOSURES and associated macros. See:
> https://bugs.openjdk.java.net/browse/JDK-8202641
>
> Thanks,
> StefanK
More information about the hotspot-gc-dev
mailing list