graal icon indicating copy to clipboard operation
graal copied to clipboard

[GR-53920] Use hashed lookup in the secondary supers array.

Open graalvmbot opened this issue 9 months ago • 1 comments

This PR

  1. 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
  2. ports hashed lookup in the secondary supers array;
  3. introduces an AMD64 match rule that replaces test with bit test to reduce size;
  4. 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

graalvmbot avatar May 16 '24 10:05 graalvmbot

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

  1. If this is not gonna happen in the foreseeable future, we will merge as is.

  2. Is there a plan to backport to 21u? We will maintain both versions if not.

mur47x111 avatar May 16 '24 10:05 mur47x111