diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.cI don't get this bit here. You may want CPU information when capturing
index 302d49a..1c8eb4b 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -119,9 +119,12 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts)
if (opts->raw_samples) {
attr->sample_type |= PERF_SAMPLE_TIME;
attr->sample_type |= PERF_SAMPLE_RAW;
- attr->sample_type |= PERF_SAMPLE_CPU;
}
in raw + per-thread mode.
+ /* Need to know the CPU for tools that need to order events */
+ if (attr->sample_type& PERF_SAMPLE_TIME)
+ attr->sample_type |= PERF_SAMPLE_CPU;
+