perf lock: Fix and add misc documentally things
authorHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Thu, 4 Feb 2010 07:08:15 +0000 (16:08 +0900)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 27 Feb 2010 16:05:22 +0000 (17:05 +0100)
I've forgot to add 'perf lock' line to command-list.txt,
so users of perf could not find perf lock when they type 'perf'.

Fixing command-list.txt requires document
(tools/perf/Documentation/perf-lock.txt).
But perf lock is too much "under construction" to write a
stable document, so this is something like pseudo document for now.

And I wrote description of perf lock at help section of
CONFIG_LOCK_STAT, this will navigate users of lock trace events.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
LKML-Reference: <1265267295-8388-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
lib/Kconfig.debug
tools/perf/Documentation/perf-lock.txt [new file with mode: 0644]
tools/perf/command-list.txt

index 25c3ed594c547966c1c291750d8adeb3b9e5674b..65f964e7fe7857a5865410a9c3b7a087b3541804 100644 (file)
@@ -520,6 +520,12 @@ config LOCK_STAT
 
         For more details, see Documentation/lockstat.txt
 
+        You can analyze lock events with "perf lock", subcommand of perf.
+        If you want to use "perf lock", you need to turn on CONFIG_EVENT_TRACING.
+
+        CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
+        (CONFIG_LOCKDEP defines "acquire" and "release" events.)
+
 config DEBUG_LOCKDEP
        bool "Lock dependency engine debugging"
        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 (file)
index 0000000..b317102
--- /dev/null
@@ -0,0 +1,29 @@
+perf-lock(1)
+============
+
+NAME
+----
+perf-lock - Analyze lock events
+
+SYNOPSIS
+--------
+[verse]
+'perf lock' {record|report|trace}
+
+DESCRIPTION
+-----------
+You can analyze various lock behaviours
+and statistics with this 'perf lock' command.
+
+  'perf lock record <command>' records lock events
+  between start and end <command>. And this command
+  produces the file "perf.data" which contains tracing
+  results of lock events.
+
+  'perf lock trace' shows raw lock events.
+
+  'perf lock report' reports statistical data.
+
+SEE ALSO
+--------
+linkperf:perf[1]
index 9afcff2e3ae5ba5d54901fb6a32f449cf0b52dc3..db6ee94d4a8e4fcef7277cbd69384e2b291611da 100644 (file)
@@ -18,3 +18,4 @@ perf-top                      mainporcelain common
 perf-trace                     mainporcelain common
 perf-probe                     mainporcelain common
 perf-kmem                      mainporcelain common
+perf-lock                      mainporcelain common