RFR: JDK-8314890: Reduce number of loads for Klass decoding in static code [v9]
Thomas Stuefe
stuefe at openjdk.org
Wed Nov 15 12:43:35 UTC 2023
On Wed, 8 Nov 2023 10:36:59 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>>
>> - Renamed _combo
>> - Merge branch 'master' into optimize-narrow-klass-decoding-in-c++
>> - simplify assert
>> - add comment
>> - Update src/hotspot/share/oops/compressedKlass.hpp
>>
>> Co-authored-by: Aleksey Shipilëv <shipilev at amazon.de>
>> - Update src/hotspot/share/oops/compressedKlass.cpp
>>
>> Co-authored-by: Aleksey Shipilëv <shipilev at amazon.de>
>> - Update src/hotspot/share/oops/compressedKlass.cpp
>>
>> Co-authored-by: Aleksey Shipilëv <shipilev at amazon.de>
>> - Update src/hotspot/share/oops/compressedKlass.cpp
>>
>> Co-authored-by: Aleksey Shipilëv <shipilev at amazon.de>
>> - Merge branch 'openjdk:master' into optimize-narrow-klass-decoding-in-c++
>> - Merge branch 'openjdk:master' into optimize-narrow-klass-decoding-in-c++
>> - ... and 6 more: https://git.openjdk.org/jdk/compare/9864951d...56cde2a9
>
> 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.
> src/hotspot/share/oops/compressedKlass.hpp line 67:
>
>> 65: // - Bit [0-7] shift
>> 66: // - Bit 8 UseCompressedClassPointers
>> 67: // - Bits [16-64] the base.
>
> Suggestion:
>
> // - Bit [0-7] shift
> // - Bit 8 UseCompressedClassPointers
> // - Bits [16-64] heap base
Let's call it encoding base and encoding shift. It is not the heap base either.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15389#discussion_r1394144917
PR Review Comment: https://git.openjdk.org/jdk/pull/15389#discussion_r1394146454
More information about the hotspot-dev
mailing list