RFR: 8305896: Alternative full GC forwarding [v12]
Erik Österlund
eosterlund at openjdk.org
Thu May 4 09:37:28 UTC 2023
On Fri, 28 Apr 2023 17:52:33 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>> It seems to be used in a couple of places already:
>>
>> grep -R ff51afd7ed558ccd src
>> src/jdk.jfr/share/classes/jdk/jfr/internal/EventWriterKey.java: z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
>> src/java.base/share/classes/java/util/SplittableRandom.java: z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL; // MurmurHash3 mix constants
>> src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java: z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
>> src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java: z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
>> src/hotspot/share/gc/shared/slidingForwarding.cpp: val *= 0xff51afd7ed558ccdULL;
>> src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.cpp: key *= UINT64_C(0xff51afd7ed558ccd);
>
> Sounds good then.
If you wouldn't mind, I think this one is even better: https://github.com/iwanowww/jdk/blob/ssc.cascading/src/hotspot/share/oops/klass.cpp?plain=1#L309
@iwanowww is using it for faster type checking. Our very own @rose00 is behind this one, so we can definitely use it. It performs very well (~1ns per hash). The hash algo passes BigCrush (as a CBPNRG) and SMhasher (with the right loop to combine the input blocks). It's basically a fantastic hash function, that we are free to use.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13582#discussion_r1184778234
More information about the shenandoah-dev
mailing list