Skip to content

Commit

Permalink
perf evsel: No need to always ask for PERF_FORMAT_TOTAL_TIME_{ENABLED…
Browse files Browse the repository at this point in the history
…,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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Dec 11, 2012
1 parent 3a5afae commit 62b807f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tools/perf/tests/attr/base-record
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ size=96
config=0
sample_period=4000
sample_type=263
read_format=3
read_format=0
disabled=1
inherit=1
pinned=0
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/tests/attr/test-record-group
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ args = --group -e cycles,instructions kill >/dev/null 2>&1
fd=1
group_fd=-1
sample_type=327
read_format=7
read_format=4

[event-2:base-record]
fd=2
group_fd=1
config=1
sample_type=327
read_format=7
read_format=4
mmap=0
comm=0
enable_on_exec=0
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/tests/attr/test-record-group1
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ args = -e '{cycles,instructions}' kill >/tmp/krava 2>&1
fd=1
group_fd=-1
sample_type=327
read_format=7
read_format=4

[event-2:base-record]
fd=2
group_fd=1
type=0
config=1
sample_type=327
read_format=7
read_format=4
mmap=0
comm=0
enable_on_exec=0
Expand Down
2 changes: 0 additions & 2 deletions tools/perf/util/evsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@ void perf_evsel__config(struct perf_evsel *evsel,

attr->sample_id_all = opts->sample_id_all_missing ? 0 : 1;
attr->inherit = !opts->no_inherit;
attr->read_format = PERF_FORMAT_TOTAL_TIME_ENABLED |
PERF_FORMAT_TOTAL_TIME_RUNNING;

perf_evsel__set_sample_bit(evsel, IP);
perf_evsel__set_sample_bit(evsel, TID);
Expand Down

0 comments on commit 62b807f

Please sign in to comment.