diff options
-rw-r--r-- | tools/perf/builtin-annotate.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-diff.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 5 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 2 |
4 files changed, 10 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 48dbab4..c056cdc 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -375,6 +375,8 @@ static struct perf_event_ops event_ops = { .mmap = event__process_mmap, .comm = event__process_comm, .fork = event__process_task, + .ordered_samples = true, + .ordering_requires_timestamps = true, }; static int __cmd_annotate(void) diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index af84e1c..97846dc 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -61,6 +61,8 @@ static struct perf_event_ops event_ops = { .exit = event__process_task, .fork = event__process_task, .lost = event__process_lost, + .ordered_samples = true, + .ordering_requires_timestamps = true, }; static void perf_session__insert_hist_entry_by_name(struct rb_root *root, diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index efd1b3c..5149e3d 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -285,7 +285,7 @@ static void create_counter(int counter, int cpu) if (system_wide) attr->sample_type |= PERF_SAMPLE_CPU; - if (sample_time) + if (sample_time || system_wide || !no_inherit || cpu_list) attr->sample_type |= PERF_SAMPLE_TIME; if (raw_samples) { @@ -327,6 +327,9 @@ try_again: * Old kernel, no attr->sample_id_type_all field */ sample_id_all_avail = false; + if (!sample_time && !raw_samples) + attr->sample_type &= ~PERF_SAMPLE_TIME; + goto retry_sample_id; } diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index fd4c450..4af7ce6 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -244,6 +244,8 @@ static struct perf_event_ops event_ops = { .event_type = event__process_event_type, .tracing_data = event__process_tracing_data, .build_id = event__process_build_id, + .ordered_samples = true, + .ordering_requires_timestamps = true, }; extern volatile int session_done; |