diff options
author | Stephane Eranian <eranian@google.com> | 2010-05-12 04:40:01 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-13 15:39:12 -0400 |
commit | 2e6cdf996ba43ce0b090ffbf754f83e17362cd69 (patch) | |
tree | bb471a4ae13fa3941612c30c75bead7417084667 /tools/perf/Documentation | |
parent | 8a0ecfb8b47dc765fdf460913231876bbc95385e (diff) |
perf tools: change event inheritance logic in stat and record
By default, event inheritance across fork and pthread_create was on but the -i
option of stat and record, which enabled inheritance, led to believe it was off
by default.
This patch fixes this logic by inverting the meaning of the -i option. By
default inheritance is on whether you attach to a process (-p), a thread (-t)
or start a process. If you pass -i, then you turn off inheritance. Turning off
inheritance if you don't need it, helps limit perf resource usage as well.
The patch also fixes perf stat -t xxxx and perf record -t xxxx which did not
start the counters.
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <4bea9d2f.d60ce30a.0b5b.08e1@mx.google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Documentation')
-rw-r--r-- | tools/perf/Documentation/perf-record.txt | 4 | ||||
-rw-r--r-- | tools/perf/Documentation/perf-stat.txt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index 020d871c7934..34e255fc3e2f 100644 --- a/tools/perf/Documentation/perf-record.txt +++ b/tools/perf/Documentation/perf-record.txt | |||
@@ -69,8 +69,8 @@ OPTIONS | |||
69 | Output file name. | 69 | Output file name. |
70 | 70 | ||
71 | -i:: | 71 | -i:: |
72 | --inherit:: | 72 | --no-inherit:: |
73 | Child tasks inherit counters. | 73 | Child tasks do not inherit counters. |
74 | -F:: | 74 | -F:: |
75 | --freq=:: | 75 | --freq=:: |
76 | Profile at this frequency. | 76 | Profile at this frequency. |
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt index 484080dd5b6f..2cab8e8c33d0 100644 --- a/tools/perf/Documentation/perf-stat.txt +++ b/tools/perf/Documentation/perf-stat.txt | |||
@@ -31,8 +31,8 @@ OPTIONS | |||
31 | hexadecimal event descriptor. | 31 | hexadecimal event descriptor. |
32 | 32 | ||
33 | -i:: | 33 | -i:: |
34 | --inherit:: | 34 | --no-inherit:: |
35 | child tasks inherit counters | 35 | child tasks do not inherit counters |
36 | -p:: | 36 | -p:: |
37 | --pid=<pid>:: | 37 | --pid=<pid>:: |
38 | stat events on existing pid | 38 | stat events on existing pid |