RFR: 8254793: [JVMCI] improve speculation encoding [v4]
Tom Rodriguez
never at openjdk.java.net
Fri Oct 16 20:03:19 UTC 2020
On Fri, 16 Oct 2020 16:33:20 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> This PR changes the encoding of a `jdk.vm.ci.hotspot.HotSpotSpeculationLog.HotSpotSpeculation` from a long to an int.
>> The `Thread::_pending_failed_speculation` field remains as a `jlong` since it is already exposed to JVMCI Java code
>> already via VMStructs and this PR does not update its usage in Graal.
>
> Doug Simon has refreshed the contents of this pull request, and previous commits have been removed. The incremental
> views will show differences compared to the previous content of the PR.
Marked as reviewed by never (Reviewer).
src/hotspot/share/jvmci/jvmciRuntime.hpp line 55:
> 53: FailedSpeculation** _failed_speculations;
> 54:
> 55: // A speculation id is an index (high 26 bits) and a length (low 5 bits).
We don't really have to enforce that it fits in an int any more. I think it would be more natural to allow to use all
the remaining bits even though we'll never actually use that space in practice. Doing so makes the code look a little
odd I think since there's no obvious reason for limit. We just want an encoding that's int friendly for the normal
case.
-------------
PR: https://git.openjdk.java.net/jdk/pull/667
More information about the hotspot-dev
mailing list