RFR: 8322636: [JVMCI] HotSpotSpeculationLog can be inconsistent across a single compile [v2]

David Leopoldseder davleopo at openjdk.org
Fri Jan 5 09:02:23 UTC 2024


On Wed, 3 Jan 2024 20:39:21 GMT, Tom Rodriguez <never at openjdk.org> wrote:

>> David Leopoldseder has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8322636: [JVMCI] HotSpotSpeculationLog add javadoc to maySpeculate
>
> So I looked more closely the HotSpot and substrate implementations and I'm not sure we can currently align the implementation and the javadoc.  In the HotSpot world, HotSpotSpeculationLog is a compiler local object that reads data from the real speculation data that's kept in the MDO.  This means that it has full control over when collectFailedSpeculations is called.  SubstrateSpeculationLog is the actual log so if two threads are operating on the same log then one of them could see the effects of a call to collectFailedSpeculations by the other thread.  Maybe in practice 2 threads never do this because it would mean they are compiling the same root method but it doesn't seem guaranteed.  installCode on substrate also doesn't perform the speculation log check that HotSpot does.  So maybe we punt on javadoc updates for now.

@tkrodriguez please sponsor

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

PR Comment: https://git.openjdk.org/jdk/pull/17183#issuecomment-1878335348


More information about the hotspot-compiler-dev mailing list