RFR (S) : JDK-8245043 : Simplified contention benchmark
    Aleksey Shipilev 
    shade at redhat.com
       
    Wed Jun  3 17:33:33 UTC 2020
    
    
  
On 6/3/20 7:28 PM, Daniel D. Daugherty wrote:
>>> *) Does it still make sense to have separate update1, update2?
>>
>> It spends a few percent more time in the locking code when the update1 
>> middle method is used, I think it is a little better for testing these 
>> cases.
> 
> By using update1() -> update2() you get the recursive locking
> that you're look for right? I thought part of the point was to
> optionally throw the exception thru a couple of stack frames
> where the monitor was held in each frame...
My gut feeling is that both methods are on hot paths, so would/should be inlined? If we want to have
separate stack frames, it would make sense to sprinkle some @CompilerControl(DONT_INLINE) around to
make sure it actually does the call.
-- 
Thanks,
-Aleksey
    
    
More information about the hotspot-runtime-dev
mailing list