Lock usage statistics

configname: CONFIG_LOCK_STAT

Linux Kernel Configuration
└─>Kernel hacking
└─>Lock Debugging (spinlocks, mutexes, etc...)
└─>Lock usage statistics
In linux kernel since version 2.6.23 (release Date: 2007-10-09)
This feature enables tracking lock contention points

For more details, see <a href="https://www.kernel.org/doc/Documentation/locking/lockstat.rst

This">Documentation/locking/lockstat.rst

This</a> also enables lock events required by "perf lock",
subcommand of perf.
If you want to use "perf lock", you also need to turn on
CONFIG_EVENT_TRACING.

CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
(CONFIG_LOCKDEP defines "acquire" and "release" events.)