dotTrace 2016.2 Help

Lock Contention

The Lock Contention event is used to indicate time intervals where threads were blocked due to lock contention.

Lock contention takes place when a thread tries to acquire the lock to an object which is already acquired by other thread*. Until the object is released, the thread is blocked (in other words, it is in the Waiting state). In some cases, this may lead to a so-called serial execution which negatively affects application performance. The serial execution pattern can be easily determined using the Threads diagram. Instead of threads running in parallel, you will see only one thread running at a time.


Select the Lock Contention event to analyze lock contentions in your app: evaluate how often threads are blocked due to contention, what methods are trying to acquire the lock, and so on. For example, to find out what method in a thread tries to acquire the lock, select the thread in the Threads diagram and the Lock Contention event in Interval Filters. The methods will be shown on top of the Top Methods in the Call Stack window.

Last modified: 15 December 2016