where is the code for recursive locking of the same thread when use biased locking.
yumin.qi at oracle.com
yumin.qi at oracle.com
Wed Jun 15 12:03:57 PDT 2011
Wei,
The code is in Assembler part(platform dependent part), if you follow
monitorenter->lock_object->biased_locking_enter, you will find it. If
the thread which owns the lock with biased pattern, it will not enter
fast_enter/slow_enter.
Hope this helps.
--Yumin
On 6/14/2011 8:45 AM, wei he wrote:
> dear all, this is my first post, so if there are something wrong, pls
> to point out.
>
> As for biased locking, we know that when one thread has got an
> object's lock use biased pattern, when the thread want to got the lock
> again(the thread don't relase the lock at that time), hotspot just to
> find the thread has already owned the lock and do nothing( at least
> not change the object's header), could anyone told me where i can find
> the code to deal with this recursive locking situation. I had read
> synchronize.hpp(cpp),biasedLocking.hpp(cpp), but find nothing, i think
> the fast_enter() function in the synchronize.cpp didn't deal this
> case(The openjdk's version i got is
> openjdk-7-ea-src-b136-31_mar_2011). Any suggestion is appreciated!
More information about the hotspot-runtime-dev
mailing list