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.
如果锁刚好只被一个线程访问,则可以使用偏向锁。
Whether or not biased locking is being performed (-xx: + UseBiasedLocking); note that JDK 1.6 + automatically does this.
是否执行偏向锁(biased locking,- XX: + UseBiasedLocking);注意,JD k 1.6及更高版本会自动执行这个特性。
应用推荐