diff options
author | Jiri Olsa <[email protected]> | 2017-08-24 18:27:31 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-08-28 11:05:10 -0300 |
commit | a17f06978769735ab5c7598c46881fa201e9b1a2 (patch) | |
tree | 9e9658c8041a6fe23f2b257bd28974997e7f5807 | |
parent | 12c15302dd4b768105d4b7a487ed4858ccab94fc (diff) |
perf record: Set read_format for inherit_stat
Set read_format for what we expect to get from read event generated by
perf_event_attr::inherit_stat.
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/evsel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index a5888c704e01..d9bd632ed7db 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -902,8 +902,13 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts, if (opts->no_samples) attr->sample_freq = 0; - if (opts->inherit_stat) + if (opts->inherit_stat) { + evsel->attr.read_format |= + PERF_FORMAT_TOTAL_TIME_ENABLED | + PERF_FORMAT_TOTAL_TIME_RUNNING | + PERF_FORMAT_ID; attr->inherit_stat = 1; + } if (opts->sample_address) { perf_evsel__set_sample_bit(evsel, ADDR); |