mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-16 14:38:49 +00:00
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 <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20170824162737.7813-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
12c15302dd
commit
a17f069787
@ -902,8 +902,13 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
|
|||||||
if (opts->no_samples)
|
if (opts->no_samples)
|
||||||
attr->sample_freq = 0;
|
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;
|
attr->inherit_stat = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (opts->sample_address) {
|
if (opts->sample_address) {
|
||||||
perf_evsel__set_sample_bit(evsel, ADDR);
|
perf_evsel__set_sample_bit(evsel, ADDR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user