RFR: JDK-8314890: Reduce number of loads for Klass decoding in static code [v9]

Thomas Stuefe stuefe at openjdk.org
Wed Nov 15 12:55:33 UTC 2023


On Wed, 15 Nov 2023 12:39:20 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/oops/compressedKlass.cpp line 45:
>> 
>>> 43:   assert(theshift == 0 || theshift == LogKlassAlignmentInBytes, "invalid shift for klass ptrs");
>>> 44:   _base = thebase;
>>> 45:   _shift = theshift;
>> 
>> Do we even need `_base` and `_shift` as separate fields after this change then?
>
> No, I don't think so. Lets remove it.

Wait, yes, we still need it for VMStructs. Would require duplicating the decoding logic on the VMStructs consumer side, which I would rather not.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15389#discussion_r1394159945


More information about the hotspot-dev mailing list