RFR(s): 8218147: make_walkable asserts on multiple calls

dean.long at oracle.com dean.long at oracle.com
Fri Apr 5 07:22:24 UTC 2019


On 4/4/19 5:16 PM, dean.long at oracle.com wrote:
>
>>>
>>> If it's already set, should we check that _last_Java_pc matches the 
>>> new value?
>>
>> We manually set the pc in several places, so if it's set, it's not 
>> certain that
>> it should be the same as in last sp.
>> I can't distinguish between the cases.
>>
>
> If we get pc from sp[-1] then it should match, but you're right, we 
> sometimes get pc from somewhere else. 

How about if we combine the !walkable check and the 
capture_last_Java_pc() logic into a single method?
Then we can do something like:

     if (!walkable()) {
         address pc = (address)_last_Java_sp[-1];
         address a = Atomic::cmpxchg(pc, &_last_Java_pc, NULL);
         assert(a == NULL || a == pc, "unexpected PC %p", a);
     }

dl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20190405/b9650961/attachment.html>


More information about the hotspot-compiler-dev mailing list