RFR: 8274286: Skip null for make_referent_alive in referenceProcessor [v2]

Kim Barrett kbarrett at openjdk.java.net
Wed Sep 29 22:14:45 UTC 2021


On Wed, 29 Sep 2021 12:39:42 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Simple change of avoiding a virtual call for null referent. With this change, two methods of processing the discovered list, `process_discovered_list_work` and `preclean_discovered_reflist`, share the same structure.
>> 
>> Test: hotspot_gc
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review

Looks good, other than mentioned over-deletion in comment.

src/hotspot/share/gc/shared/referenceProcessor.cpp line 1130:

> 1128: // Walk the given discovered ref list, and remove all reference objects
> 1129: // whose referents are still alive, whose referents are NULL or which
> 1130: // are not active (have a non-NULL next field). NOTE: When we are

I think the part of the comment beginning with "NOTE" is still relevant and should not be deleted.  Apologies for not pointing this out earlier.

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

Marked as reviewed by kbarrett (Reviewer).

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



More information about the hotspot-gc-dev mailing list