RFR: 8202591: Remove usage of CMSEdenChunksRecordAlways in defNewGeneration.cpp

Erik Österlund erik.osterlund at oracle.com
Fri May 4 10:07:05 UTC 2018


Hi Stefan,

Looks good.

Thanks,
/Erik

On 2018-05-04 10:58, Stefan Karlsson 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
>
> 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