RFR: 8254793: [JVMCI] improve speculation encoding [v3]

Vladimir Kozlov kvn at openjdk.java.net
Thu Oct 15 18:59:11 UTC 2020


On Thu, 15 Oct 2020 09:30:21 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.

src/hotspot/share/runtime/thread.hpp line 1173:

> 1171:   // JVMCI as a jlong, it needs to be kept as a long to maintain backwards compatibility
> 1172:   // with JVMCI based compilers that emit code to update the field directly.
> 1173:   jlong     _pending_failed_speculation;

I am confusing about backword compatibility comment. It said that old Graal (link in current JDK) generate code which
writes 64 bits into this word. Will it use [32:32] index:length format or it will use new [0:27:5] format? I don't see
changes to Graal in this PR.

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

PR: https://git.openjdk.java.net/jdk/pull/667


More information about the hotspot-dev mailing list