RFR (S): 8189355: Cleanup of BarrierSet barrier functions
Erik Österlund
erik.osterlund at oracle.com
Wed Oct 18 07:45:35 UTC 2017
Hi Per,
Fixed in the latest webrev. While I have removed that already in a
subsequent patch, this does seem like a good time to do that.
Thanks for the review.
/Erik
On 2017-10-18 08:30, Per Liden wrote:
> Hi Erik,
>
> Looks good. Just one comment:
>
> share/gc/shared/cardTableModRefBS.hpp:
>
> 194 public:
> 195 inline void inline_write_region(MemRegion mr) {
> 196 dirty_MemRegion(mr);
> 197 }
> 198
> 199 protected:
> 200 void write_region_work(MemRegion mr) {
> 201 inline_write_region(mr);
> 202 }
> 203
> 204 public:
> 205 inline void inline_write_ref_array(MemRegion mr) {
> 206 dirty_MemRegion(mr);
> 207 }
> 208
> 209 protected:
> 210 void write_ref_array_work(MemRegion mr) {
> 211 inline_write_ref_array(mr);
> 212 }
>
> Looks like we can collapse these four functions into two? I can't see
> any other uses of the inline_* functions.
>
> /Per
>
> On 2017-10-17 12:27, Erik Österlund wrote:
>> Hi,
>>
>> The BarrierSet class has a bunch of unused or used in a seemingly
>> nonsense way code. Some methods are used but only used in assertion, and
>> are expected to return true (the has_*_opt methods). Others describe
>> barriers that are never called from anywhere. This might have made sense
>> at some point, but arguably does not any more. There is also an enum
>> called Flags not referenced from anywhere.
>>
>> I would also like to get rid of devirtualize_reference_writes() which
>> devirtualizes calls to the post-write barrier for card marking
>> specifically by loading and comparing the type of barrier set. I have
>> run a bunch of benchmarks and this optimization did not seem to provide
>> any benefit. It will also soon be superseded by the new GC barrier
>> interface.
>>
>> CR:
>> https://bugs.openjdk.java.net/browse/JDK-8189355
>>
>> Webrev:
>> http://cr.openjdk.java.net/~eosterlund/8189355/webrev.00/
>>
>> Thanks,
>> /Erik
More information about the hotspot-gc-dev
mailing list