diff options
-rw-r--r-- | lib/Kconfig.debug | 6 | ||||
-rw-r--r-- | tools/perf/Documentation/perf-lock.txt | 29 | ||||
-rw-r--r-- | tools/perf/command-list.txt | 1 |
3 files changed, 36 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 25c3ed594c54..65f964e7fe78 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -520,6 +520,12 @@ config LOCK_STAT | |||
520 | 520 | ||
521 | For more details, see Documentation/lockstat.txt | 521 | For more details, see Documentation/lockstat.txt |
522 | 522 | ||
523 | You can analyze lock events with "perf lock", subcommand of perf. | ||
524 | If you want to use "perf lock", you need to turn on CONFIG_EVENT_TRACING. | ||
525 | |||
526 | CONFIG_LOCK_STAT defines "contended" and "acquired" lock events. | ||
527 | (CONFIG_LOCKDEP defines "acquire" and "release" events.) | ||
528 | |||
523 | config DEBUG_LOCKDEP | 529 | config DEBUG_LOCKDEP |
524 | bool "Lock dependency engine debugging" | 530 | bool "Lock dependency engine debugging" |
525 | depends on DEBUG_KERNEL && LOCKDEP | 531 | depends on DEBUG_KERNEL && LOCKDEP |
diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt new file mode 100644 index 000000000000..b317102138c8 --- /dev/null +++ b/tools/perf/Documentation/perf-lock.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | perf-lock(1) | ||
2 | ============ | ||
3 | |||
4 | NAME | ||
5 | ---- | ||
6 | perf-lock - Analyze lock events | ||
7 | |||
8 | SYNOPSIS | ||
9 | -------- | ||
10 | [verse] | ||
11 | 'perf lock' {record|report|trace} | ||
12 | |||
13 | DESCRIPTION | ||
14 | ----------- | ||
15 | You can analyze various lock behaviours | ||
16 | and statistics with this 'perf lock' command. | ||
17 | |||
18 | 'perf lock record <command>' records lock events | ||
19 | between start and end <command>. And this command | ||
20 | produces the file "perf.data" which contains tracing | ||
21 | results of lock events. | ||
22 | |||
23 | 'perf lock trace' shows raw lock events. | ||
24 | |||
25 | 'perf lock report' reports statistical data. | ||
26 | |||
27 | SEE ALSO | ||
28 | -------- | ||
29 | linkperf:perf[1] | ||
diff --git a/tools/perf/command-list.txt b/tools/perf/command-list.txt index 9afcff2e3ae5..db6ee94d4a8e 100644 --- a/tools/perf/command-list.txt +++ b/tools/perf/command-list.txt | |||
@@ -18,3 +18,4 @@ perf-top mainporcelain common | |||
18 | perf-trace mainporcelain common | 18 | perf-trace mainporcelain common |
19 | perf-probe mainporcelain common | 19 | perf-probe mainporcelain common |
20 | perf-kmem mainporcelain common | 20 | perf-kmem mainporcelain common |
21 | perf-lock mainporcelain common | ||