RFR: 8202591: Remove usage of CMSEdenChunksRecordAlways in defNewGeneration.cpp
Kim Barrett
kim.barrett at oracle.com
Fri May 4 19:04:42 UTC 2018
> On May 4, 2018, at 4:58 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>
> Hi all,
>
> Please review this patch to remove the usage of CMSEdenChunksRecordAlways in defNewGeneration.cpp.
>
> http://cr.openjdk.java.net/~stefank/8202591/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8202591
Looks good. Thanks for the detailed description below.
> This is a step towards getting rid of CMS dependent code from defNewGeneration.cpp.
>
> DefNewGeneration::allocate and DefNewGeneration::par_allocate both have this code:
>
> #if INCLUDE_ALL_GCS
> if (CMSEdenChunksRecordAlways && _old_gen != NULL) {
> if (_old_gen != NULL) {
> _old_gen->sample_eden_chunk();
> }
> #endif
>
> _old_gen is TenuredGeneration when running with Serial, which uses the default sample_eden_chunk() implementation in Generation:
> virtual void sample_eden_chunk() {}
>
> _old_gen is ConcurrentMarkSweepGeneration when running with CMS, which uses:
> void sample_eden_chunk() {
> //Delegate to collector
> return collector()->sample_eden_chunk();
> }
>
> and this is the code in CMSCollector's sample_eden_chunk:
> void CMSCollector::sample_eden_chunk() {
> if (CMSEdenChunksRecordAlways && _eden_chunk_array != NULL) {
>
> Note also that CMSEdenChunksRecordAlways is always true, even when we're not running with CMS.
>
> I propose that we get rid of the CMSEdenChunksRecordAlways check in defNewGeneration.cpp.
>
> Thanks,
> StefanK
More information about the hotspot-gc-dev
mailing list