RFR: 8260309: Shenandoah: Clean up ShenandoahBarrierSet [v3]

Zhengyu Gu zgu at openjdk.java.net
Mon Feb 1 16:07:42 UTC 2021


On Mon, 1 Feb 2021 11:00:59 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> We collected some cruft in ShenandoahBarrierSet. Time to clean it up. 
>> 
>> This fixes/removes a number of includes, fixes some comments and it also removes is_a() and is_aligned() which look like leftovers/requirements from earlier incarnations of the superclass BarrierSet. Using the override keyword would be useful for such situations (btw, are we ok to start using override, nullptr, auto etc in Shenandoah, or do we want to keep it C++ for backporting ease?)
>> 
>> One thing I was not sure about is the ShenandoahHeap* _heap field. Making it const will likely help the compiler avoid repeated access (e.g. in a number of perf-critical paths like the LRB impl). However, maybe we should get rid of the field altogether and make it explicitely using ShenandoahHeap::heap() and avoid repeated access instead of helping the compiler and hoping for the best?
>> 
>> Testing:
>>  - [x] hotspot_gc_shenandoah release, fastdebug
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Include accessBarrierSupport.inline.hpp instead of accessBarrierSupport.hpp

Looks good.

-------------

Marked as reviewed by zgu (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2202



More information about the hotspot-gc-dev mailing list