RFR: 8302127: Remove unused arg in write_ref_field_post

Albert Mingkun Yang ayang at openjdk.org
Mon Feb 13 10:22:30 UTC 2023


On Fri, 10 Feb 2023 23:19:27 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Trivial removing dead code.
>
> 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.

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

PR: https://git.openjdk.org/jdk/pull/12489


More information about the hotspot-dev mailing list