RFR: 8279619: [JVMCI] improve EncodedSpeculationReason
Tom Rodriguez
never at openjdk.org
Fri Feb 17 05:01:37 UTC 2023
On Mon, 13 Feb 2023 12:22:01 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> This PR enhances `jdk.vm.ci.meta.EncodedSpeculationReason.encode` such that the `groupName` parameter is included in the encoding. This mitigates the possibility of 2 unrelated speculation objects having the same hash which, in turn, mitigates the possibility of missing a speculation based optimization opportunity.
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/EncodedSpeculationReason.java line 64:
> 62: encoding = encodingSupplier.get();
> 63: encoding.addInt(groupId);
> 64: encoding.addInt(groupName.hashCode());
Why aren't we adding the whole String? I think we should either add the whole string or update the javadoc to document the current implementation, where the groupName is simply a nice name provided for printing and it's up to the user to provide a stable definitions of group ids.
-------------
PR: https://git.openjdk.org/jdk/pull/12532
More information about the hotspot-compiler-dev
mailing list