diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-07-06 08:18:21 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-08-12 11:02:54 -0400 |
commit | 0a8cb85c200c4082ed7e57efd90dd9d18c8d40b6 (patch) | |
tree | 6e9bb61b2a8e10a9f86ed8c48da6cb84aa06fa0d /tools/perf | |
parent | 8affc2b8c27bfc2d6e70827b746f490b62c44eaa (diff) |
perf tools: Rename ordered_samples bool to ordered_events
The time ordering is generic for all kinds of events, so using generic
name 'ordered_events' for ordered_samples bool in perf_tool struct.
No functional change was intended.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-07mrqzcuhsks9wfmxrzsvemz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-annotate.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-diff.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-inject.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-kmem.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-kvm.c | 4 | ||||
-rw-r--r-- | tools/perf/builtin-lock.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-mem.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-sched.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-script.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-timechart.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-trace.c | 2 | ||||
-rw-r--r-- | tools/perf/util/session.c | 10 | ||||
-rw-r--r-- | tools/perf/util/tool.h | 2 |
14 files changed, 19 insertions, 19 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 1ec429fef2be..952b5ece6740 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -297,7 +297,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused) | |||
297 | .comm = perf_event__process_comm, | 297 | .comm = perf_event__process_comm, |
298 | .exit = perf_event__process_exit, | 298 | .exit = perf_event__process_exit, |
299 | .fork = perf_event__process_fork, | 299 | .fork = perf_event__process_fork, |
300 | .ordered_samples = true, | 300 | .ordered_events = true, |
301 | .ordering_requires_timestamps = true, | 301 | .ordering_requires_timestamps = true, |
302 | }, | 302 | }, |
303 | }; | 303 | }; |
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 9a5a035cb426..c10cc44bae19 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -360,7 +360,7 @@ static struct perf_tool tool = { | |||
360 | .exit = perf_event__process_exit, | 360 | .exit = perf_event__process_exit, |
361 | .fork = perf_event__process_fork, | 361 | .fork = perf_event__process_fork, |
362 | .lost = perf_event__process_lost, | 362 | .lost = perf_event__process_lost, |
363 | .ordered_samples = true, | 363 | .ordered_events = true, |
364 | .ordering_requires_timestamps = true, | 364 | .ordering_requires_timestamps = true, |
365 | }; | 365 | }; |
366 | 366 | ||
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 9a02807387d6..ee875cca13b1 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c | |||
@@ -366,7 +366,7 @@ static int __cmd_inject(struct perf_inject *inject) | |||
366 | } else if (inject->sched_stat) { | 366 | } else if (inject->sched_stat) { |
367 | struct perf_evsel *evsel; | 367 | struct perf_evsel *evsel; |
368 | 368 | ||
369 | inject->tool.ordered_samples = true; | 369 | inject->tool.ordered_events = true; |
370 | 370 | ||
371 | evlist__for_each(session->evlist, evsel) { | 371 | evlist__for_each(session->evlist, evsel) { |
372 | const char *name = perf_evsel__name(evsel); | 372 | const char *name = perf_evsel__name(evsel); |
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index bef3376bfaf3..b5721116713b 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -256,7 +256,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused, | |||
256 | static struct perf_tool perf_kmem = { | 256 | static struct perf_tool perf_kmem = { |
257 | .sample = process_sample_event, | 257 | .sample = process_sample_event, |
258 | .comm = perf_event__process_comm, | 258 | .comm = perf_event__process_comm, |
259 | .ordered_samples = true, | 259 | .ordered_events = true, |
260 | }; | 260 | }; |
261 | 261 | ||
262 | static double fragmentation(unsigned long n_req, unsigned long n_alloc) | 262 | static double fragmentation(unsigned long n_req, unsigned long n_alloc) |
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index fe92dfdeab46..a05f43592e0a 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -1058,7 +1058,7 @@ static int read_events(struct perf_kvm_stat *kvm) | |||
1058 | struct perf_tool eops = { | 1058 | struct perf_tool eops = { |
1059 | .sample = process_sample_event, | 1059 | .sample = process_sample_event, |
1060 | .comm = perf_event__process_comm, | 1060 | .comm = perf_event__process_comm, |
1061 | .ordered_samples = true, | 1061 | .ordered_events = true, |
1062 | }; | 1062 | }; |
1063 | struct perf_data_file file = { | 1063 | struct perf_data_file file = { |
1064 | .path = kvm->file_name, | 1064 | .path = kvm->file_name, |
@@ -1311,7 +1311,7 @@ static int kvm_events_live(struct perf_kvm_stat *kvm, | |||
1311 | kvm->tool.exit = perf_event__process_exit; | 1311 | kvm->tool.exit = perf_event__process_exit; |
1312 | kvm->tool.fork = perf_event__process_fork; | 1312 | kvm->tool.fork = perf_event__process_fork; |
1313 | kvm->tool.lost = process_lost_event; | 1313 | kvm->tool.lost = process_lost_event; |
1314 | kvm->tool.ordered_samples = true; | 1314 | kvm->tool.ordered_events = true; |
1315 | perf_tool__fill_defaults(&kvm->tool); | 1315 | perf_tool__fill_defaults(&kvm->tool); |
1316 | 1316 | ||
1317 | /* set defaults */ | 1317 | /* set defaults */ |
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 6148afc995c6..c8122d323621 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c | |||
@@ -852,7 +852,7 @@ static int __cmd_report(bool display_info) | |||
852 | struct perf_tool eops = { | 852 | struct perf_tool eops = { |
853 | .sample = process_sample_event, | 853 | .sample = process_sample_event, |
854 | .comm = perf_event__process_comm, | 854 | .comm = perf_event__process_comm, |
855 | .ordered_samples = true, | 855 | .ordered_events = true, |
856 | }; | 856 | }; |
857 | struct perf_data_file file = { | 857 | struct perf_data_file file = { |
858 | .path = input_name, | 858 | .path = input_name, |
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index 4a1a6c94a5eb..80e57c84adef 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c | |||
@@ -194,7 +194,7 @@ int cmd_mem(int argc, const char **argv, const char *prefix __maybe_unused) | |||
194 | .lost = perf_event__process_lost, | 194 | .lost = perf_event__process_lost, |
195 | .fork = perf_event__process_fork, | 195 | .fork = perf_event__process_fork, |
196 | .build_id = perf_event__process_build_id, | 196 | .build_id = perf_event__process_build_id, |
197 | .ordered_samples = true, | 197 | .ordered_events = true, |
198 | }, | 198 | }, |
199 | .input_name = "perf.data", | 199 | .input_name = "perf.data", |
200 | }; | 200 | }; |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 21d830bafff3..c72cc5a12144 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -578,7 +578,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) | |||
578 | .attr = perf_event__process_attr, | 578 | .attr = perf_event__process_attr, |
579 | .tracing_data = perf_event__process_tracing_data, | 579 | .tracing_data = perf_event__process_tracing_data, |
580 | .build_id = perf_event__process_build_id, | 580 | .build_id = perf_event__process_build_id, |
581 | .ordered_samples = true, | 581 | .ordered_events = true, |
582 | .ordering_requires_timestamps = true, | 582 | .ordering_requires_timestamps = true, |
583 | }, | 583 | }, |
584 | .max_stack = PERF_MAX_STACK_DEPTH, | 584 | .max_stack = PERF_MAX_STACK_DEPTH, |
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index f83c08c0dd87..7c16aeb6b675 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1662,7 +1662,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1662 | .comm = perf_event__process_comm, | 1662 | .comm = perf_event__process_comm, |
1663 | .lost = perf_event__process_lost, | 1663 | .lost = perf_event__process_lost, |
1664 | .fork = perf_sched__process_fork_event, | 1664 | .fork = perf_sched__process_fork_event, |
1665 | .ordered_samples = true, | 1665 | .ordered_events = true, |
1666 | }, | 1666 | }, |
1667 | .cmp_pid = LIST_HEAD_INIT(sched.cmp_pid), | 1667 | .cmp_pid = LIST_HEAD_INIT(sched.cmp_pid), |
1668 | .sort_list = LIST_HEAD_INIT(sched.sort_list), | 1668 | .sort_list = LIST_HEAD_INIT(sched.sort_list), |
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index f57035b89c15..868c17d09762 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -1488,7 +1488,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1488 | .attr = process_attr, | 1488 | .attr = process_attr, |
1489 | .tracing_data = perf_event__process_tracing_data, | 1489 | .tracing_data = perf_event__process_tracing_data, |
1490 | .build_id = perf_event__process_build_id, | 1490 | .build_id = perf_event__process_build_id, |
1491 | .ordered_samples = true, | 1491 | .ordered_events = true, |
1492 | .ordering_requires_timestamps = true, | 1492 | .ordering_requires_timestamps = true, |
1493 | }, | 1493 | }, |
1494 | }; | 1494 | }; |
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 2f1a5220c090..912e3b5bb22b 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -1920,7 +1920,7 @@ int cmd_timechart(int argc, const char **argv, | |||
1920 | .fork = process_fork_event, | 1920 | .fork = process_fork_event, |
1921 | .exit = process_exit_event, | 1921 | .exit = process_exit_event, |
1922 | .sample = process_sample_event, | 1922 | .sample = process_sample_event, |
1923 | .ordered_samples = true, | 1923 | .ordered_events = true, |
1924 | }, | 1924 | }, |
1925 | .proc_num = 15, | 1925 | .proc_num = 15, |
1926 | .min_time = 1000000, | 1926 | .min_time = 1000000, |
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index a6c375224f46..36ae51d61be2 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -2209,7 +2209,7 @@ static int trace__replay(struct trace *trace) | |||
2209 | trace->tool.tracing_data = perf_event__process_tracing_data; | 2209 | trace->tool.tracing_data = perf_event__process_tracing_data; |
2210 | trace->tool.build_id = perf_event__process_build_id; | 2210 | trace->tool.build_id = perf_event__process_build_id; |
2211 | 2211 | ||
2212 | trace->tool.ordered_samples = true; | 2212 | trace->tool.ordered_events = true; |
2213 | trace->tool.ordering_requires_timestamps = true; | 2213 | trace->tool.ordering_requires_timestamps = true; |
2214 | 2214 | ||
2215 | /* add tid to output */ | 2215 | /* add tid to output */ |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 88dfef70c13d..a2c97ff1aa6a 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -104,9 +104,9 @@ struct perf_session *perf_session__new(struct perf_data_file *file, | |||
104 | } | 104 | } |
105 | 105 | ||
106 | if (tool && tool->ordering_requires_timestamps && | 106 | if (tool && tool->ordering_requires_timestamps && |
107 | tool->ordered_samples && !perf_evlist__sample_id_all(session->evlist)) { | 107 | tool->ordered_events && !perf_evlist__sample_id_all(session->evlist)) { |
108 | dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n"); | 108 | dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n"); |
109 | tool->ordered_samples = false; | 109 | tool->ordered_events = false; |
110 | } | 110 | } |
111 | 111 | ||
112 | return session; | 112 | return session; |
@@ -238,7 +238,7 @@ void perf_tool__fill_defaults(struct perf_tool *tool) | |||
238 | if (tool->build_id == NULL) | 238 | if (tool->build_id == NULL) |
239 | tool->build_id = process_finished_round_stub; | 239 | tool->build_id = process_finished_round_stub; |
240 | if (tool->finished_round == NULL) { | 240 | if (tool->finished_round == NULL) { |
241 | if (tool->ordered_samples) | 241 | if (tool->ordered_events) |
242 | tool->finished_round = process_finished_round; | 242 | tool->finished_round = process_finished_round; |
243 | else | 243 | else |
244 | tool->finished_round = process_finished_round_stub; | 244 | tool->finished_round = process_finished_round_stub; |
@@ -483,7 +483,7 @@ static int flush_sample_queue(struct perf_session *s, | |||
483 | struct ui_progress prog; | 483 | struct ui_progress prog; |
484 | int ret; | 484 | int ret; |
485 | 485 | ||
486 | if (!tool->ordered_samples || !limit) | 486 | if (!tool->ordered_events || !limit) |
487 | return 0; | 487 | return 0; |
488 | 488 | ||
489 | if (show_progress) | 489 | if (show_progress) |
@@ -1062,7 +1062,7 @@ static s64 perf_session__process_event(struct perf_session *session, | |||
1062 | if (ret) | 1062 | if (ret) |
1063 | return ret; | 1063 | return ret; |
1064 | 1064 | ||
1065 | if (tool->ordered_samples) { | 1065 | if (tool->ordered_events) { |
1066 | ret = perf_session_queue_event(session, event, &sample, | 1066 | ret = perf_session_queue_event(session, event, &sample, |
1067 | file_offset); | 1067 | file_offset); |
1068 | if (ret != -ETIME) | 1068 | if (ret != -ETIME) |
diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h index 4385816d3d49..f11636966a0f 100644 --- a/tools/perf/util/tool.h +++ b/tools/perf/util/tool.h | |||
@@ -40,7 +40,7 @@ struct perf_tool { | |||
40 | event_op2 tracing_data; | 40 | event_op2 tracing_data; |
41 | event_op2 finished_round, | 41 | event_op2 finished_round, |
42 | build_id; | 42 | build_id; |
43 | bool ordered_samples; | 43 | bool ordered_events; |
44 | bool ordering_requires_timestamps; | 44 | bool ordering_requires_timestamps; |
45 | }; | 45 | }; |
46 | 46 | ||