The line annotated in red is where biased locking is enabled.
红色的行是偏向锁被激活的地方。
If the lock happens to be accessed by only one thread, biased locking can be applied.
如果锁刚好只被一个线程访问,则可以使用偏向锁。
In fact, with the exception of column c, every run with biased locking turned on ended up providing approximately the same boost in performance.
事实上,除了C列以外,每次运行时如果开启偏向锁最终都会提供大致相同的性能提升。
应用推荐