RFR: 8302127: Remove unused arg in write_ref_field_post
Kim Barrett
kbarrett at openjdk.org
Wed Feb 15 14:30:19 UTC 2023
On Mon, 13 Feb 2023 10:20:00 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1BarrierSet.inline.hpp line 71:
>>
>>> 69:
>>> 70: template <DecoratorSet decorators, typename T>
>>> 71: inline void G1BarrierSet::write_ref_field_post(T* field) {
>>
>> So this function isn't applying the "same region" filter that's in the various other places. I wonder if
>> that's intentional, or a bug?
>
> It's safe because card-scanning is always prepared for "uninteresting" oops.
>
> It's used only by Access API; its counterpart in interpreter/c1/c2 checks for null and cross-region additionally. It's not obvious whether the discrepancy is intentional or not though.
Yeah, it looks okay. Not a hot path I think, so the additional optimization probably isn't important.
-------------
PR: https://git.openjdk.org/jdk/pull/12489
More information about the hotspot-dev
mailing list