diff --git a/tools/perf/tests/attr/base-record b/tools/perf/tests/attr/base-record index 37940665f736c7850a61fcaa107a4bdd228a7668..efd0157b9d223f14cd305c09159c5955744b3762 100644 --- a/tools/perf/tests/attr/base-record +++ b/tools/perf/tests/attr/base-record @@ -9,7 +9,7 @@ size=112 config=0 sample_period=* sample_type=263 -read_format=0 +read_format=0|4 disabled=1 inherit=1 pinned=0 diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 03a72310315fa4593db75370a74576f7813d97a6..e7dbdcc8d46532a320dedc5019034bbe3bda7868 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1088,7 +1088,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts, attr->exclude_user = 1; } - if (evsel->own_cpus) + if (evsel->own_cpus || evsel->unit) evsel->attr.read_format |= PERF_FORMAT_ID; /*