RFR: 8300657: Remove null filtering in CLD oop handle area

David Holmes dholmes at openjdk.org
Tue Jan 24 07:01:02 UTC 2023


On Mon, 23 Jan 2023 16:21:02 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

> In the CLD oop handle area, there is a null check before calling do_oop. This is unnecessary, as the closures all perform the same null filtering. Since it's a raw access, it also causes trouble for generational ZGC.

Seems fine.

Aside: Not obvious to me whether closures should be responsible for doing their own null checks or whether the framework should guarantee no nulls get passed to them. You could go either way of course, just depends on the number of closure types versus the number of closure call sites, as to which approach minimises the code. At runtime hopefully there is only ever one null check per data item.

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-runtime-dev mailing list