graal
graal copied to clipboard
[GR-53920] Use hashed lookup in the secondary supers array.
This PR
- removes update of secondary supers cache. Now the only usage is comparing the offset of the cache field against
_super_check_offset
to determine if it is primary super or secondary super; https://github.com/openjdk/jdk/blob/4083255440cfbf39b9683ea88a433d71ec6111e7/src/hotspot/share/oops/klass.hpp#L132-L134 - ports hashed lookup in the secondary supers array;
- introduces an AMD64 match rule that replaces test with bit test to reduce size;
- depends on upstream PR https://github.com/openjdk/jdk/pull/19176
See TypeCheckSnippetUtils#checkSelfAndSupers for a summary of the hashed lookup Original HotSpot PR https://github.com/openjdk/jdk/pull/18309
In preparation of secondary_super_cache removal, we are adapting the hashed lookup in the secondary supers array. Still, we have some code checking if super_check_offset is equal to offset of _secondary_super_cache.
@theRealAph It would be great if you could share your plan regarding the following 2 items:
In the future I'd like to delete the secondary super cache
-
If this is not gonna happen in the foreseeable future, we will merge as is.
-
Is there a plan to backport to 21u? We will maintain both versions if not.