diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-11-12 18:34:01 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-11-14 16:52:03 -0300 |
commit | 774cb499ca9ab0e5950a149d1fe102b125da1cee (patch) | |
tree | 4beed0b9979eaeca8ec79f67b36e02fedd5eed5a /tools/perf/tests/attr | |
parent | cac21425578abddc4e9f529845832a57ba27ce0f (diff) | |
download | linux-774cb499ca9ab0e5950a149d1fe102b125da1cee.tar.gz linux-774cb499ca9ab0e5950a149d1fe102b125da1cee.tar.bz2 linux-774cb499ca9ab0e5950a149d1fe102b125da1cee.zip |
perf tools: Fix 'disabled' attribute config for record command
Currently the record command sets all events initially as disabled.
There's non conditional perf_evlist__enable call, that enables all
events before we exec tracee program. That actually screws whole
enable_on_exec logic, because the event is enabled before the traced
program got executed.
What we actually want is:
1) For any type of traced program:
- all independent events and group leaders are disabled
- all group members are enabled
Group members are ruled by group leaders. They need to
be enabled, because the group scheduling relies on that.
2) For traced programs executed by perf:
- all independent events and group leaders have
enable_on_exec set
- we don't specifically enable or disable any event during
the record command
Independent events and group leaders are initially disabled
and get enabled by exec. Group members are ruled by group
leaders as stated in 1).
3) For traced programs attached by perf (pid/tid):
- we specifically enable or disable all events during
the record command
When attaching events to already running traced we
enable/disable events specifically, as there's no
initial traced exec call.
Fixing appropriate perf_event_attr test case to cover this change.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1352741644-16809-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/attr')
-rw-r--r-- | tools/perf/tests/attr/test-record-group | 1 | ||||
-rw-r--r-- | tools/perf/tests/attr/test-record-group1 | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/tests/attr/test-record-group b/tools/perf/tests/attr/test-record-group index b945f770dc9e..a6599e9a19d3 100644 --- a/tools/perf/tests/attr/test-record-group +++ b/tools/perf/tests/attr/test-record-group @@ -15,3 +15,4 @@ sample_type=327 mmap=0 comm=0 enable_on_exec=0 +disabled=0 diff --git a/tools/perf/tests/attr/test-record-group1 b/tools/perf/tests/attr/test-record-group1 index 013572f23605..5a8359da38af 100644 --- a/tools/perf/tests/attr/test-record-group1 +++ b/tools/perf/tests/attr/test-record-group1 @@ -16,3 +16,4 @@ sample_type=327 mmap=0 comm=0 enable_on_exec=0 +disabled=0 |