diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-10 14:04:40 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-11 15:17:17 -0500 |
commit | 62b807f64948f55776b1cc57298966d915b1a402 (patch) | |
tree | 4301639365d944146267862f70b3028ad033ebc2 | |
parent | 3a5afaec593954a399967155db47f72cb8828a6a (diff) |
perf evsel: No need to always ask for PERF_FORMAT_TOTAL_TIME_{ENABLED,RUNNING}
This is needed, so far, just in 'perf stat', to scale counters, so don't
unconditionally ask for them in the perf_evsel__config() method.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ujpujgscq2f2oodxuso5nobc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/tests/attr/base-record | 2 | ||||
-rw-r--r-- | tools/perf/tests/attr/test-record-group | 4 | ||||
-rw-r--r-- | tools/perf/tests/attr/test-record-group1 | 4 | ||||
-rw-r--r-- | tools/perf/util/evsel.c | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/tools/perf/tests/attr/base-record b/tools/perf/tests/attr/base-record index f9d04643109e..5bc3880f7be5 100644 --- a/tools/perf/tests/attr/base-record +++ b/tools/perf/tests/attr/base-record | |||
@@ -7,7 +7,7 @@ size=96 | |||
7 | config=0 | 7 | config=0 |
8 | sample_period=4000 | 8 | sample_period=4000 |
9 | sample_type=263 | 9 | sample_type=263 |
10 | read_format=3 | 10 | read_format=0 |
11 | disabled=1 | 11 | disabled=1 |
12 | inherit=1 | 12 | inherit=1 |
13 | pinned=0 | 13 | pinned=0 |
diff --git a/tools/perf/tests/attr/test-record-group b/tools/perf/tests/attr/test-record-group index 0df34cab3e42..57739cacdb2a 100644 --- a/tools/perf/tests/attr/test-record-group +++ b/tools/perf/tests/attr/test-record-group | |||
@@ -6,14 +6,14 @@ args = --group -e cycles,instructions kill >/dev/null 2>&1 | |||
6 | fd=1 | 6 | fd=1 |
7 | group_fd=-1 | 7 | group_fd=-1 |
8 | sample_type=327 | 8 | sample_type=327 |
9 | read_format=7 | 9 | read_format=4 |
10 | 10 | ||
11 | [event-2:base-record] | 11 | [event-2:base-record] |
12 | fd=2 | 12 | fd=2 |
13 | group_fd=1 | 13 | group_fd=1 |
14 | config=1 | 14 | config=1 |
15 | sample_type=327 | 15 | sample_type=327 |
16 | read_format=7 | 16 | read_format=4 |
17 | mmap=0 | 17 | mmap=0 |
18 | comm=0 | 18 | comm=0 |
19 | enable_on_exec=0 | 19 | enable_on_exec=0 |
diff --git a/tools/perf/tests/attr/test-record-group1 b/tools/perf/tests/attr/test-record-group1 index 18bd926ff6cb..4d688a13fd2f 100644 --- a/tools/perf/tests/attr/test-record-group1 +++ b/tools/perf/tests/attr/test-record-group1 | |||
@@ -6,7 +6,7 @@ args = -e '{cycles,instructions}' kill >/tmp/krava 2>&1 | |||
6 | fd=1 | 6 | fd=1 |
7 | group_fd=-1 | 7 | group_fd=-1 |
8 | sample_type=327 | 8 | sample_type=327 |
9 | read_format=7 | 9 | read_format=4 |
10 | 10 | ||
11 | [event-2:base-record] | 11 | [event-2:base-record] |
12 | fd=2 | 12 | fd=2 |
@@ -14,7 +14,7 @@ group_fd=1 | |||
14 | type=0 | 14 | type=0 |
15 | config=1 | 15 | config=1 |
16 | sample_type=327 | 16 | sample_type=327 |
17 | read_format=7 | 17 | read_format=4 |
18 | mmap=0 | 18 | mmap=0 |
19 | comm=0 | 19 | comm=0 |
20 | enable_on_exec=0 | 20 | enable_on_exec=0 |
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index e62d3aef9cd6..2492d329a5f5 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -465,8 +465,6 @@ void perf_evsel__config(struct perf_evsel *evsel, | |||
465 | 465 | ||
466 | attr->sample_id_all = opts->sample_id_all_missing ? 0 : 1; | 466 | attr->sample_id_all = opts->sample_id_all_missing ? 0 : 1; |
467 | attr->inherit = !opts->no_inherit; | 467 | attr->inherit = !opts->no_inherit; |
468 | attr->read_format = PERF_FORMAT_TOTAL_TIME_ENABLED | | ||
469 | PERF_FORMAT_TOTAL_TIME_RUNNING; | ||
470 | 468 | ||
471 | perf_evsel__set_sample_bit(evsel, IP); | 469 | perf_evsel__set_sample_bit(evsel, IP); |
472 | perf_evsel__set_sample_bit(evsel, TID); | 470 | perf_evsel__set_sample_bit(evsel, TID); |