aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-10-05 10:44:44 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-05 13:11:47 -0400
commit61949b212e7f6f8f31891236ba24033f9b7af8c3 (patch)
treed31f37b0360e2b9bef0ccde43b1f0139ef0232e8 /tools/perf/builtin-diff.c
parent81d5f95819953321a2557b0656b24ea10af9629c (diff)
perf diff: Add -p option to display period values for hist entries
Adding -p option to show period values for both compared hist entries. Showing hist column PERF_HPP__PERIOD and newly added hist column PERF_HPP__PERIOD_BASELINE. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> 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/r/1349448287-18919-6-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index d78e8386e1a9..2411dd18c556 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -24,6 +24,7 @@ static char const *input_old = "perf.data.old",
24static char diff__default_sort_order[] = "dso,symbol"; 24static char diff__default_sort_order[] = "dso,symbol";
25static bool force; 25static bool force;
26static bool show_displacement; 26static bool show_displacement;
27static bool show_period;
27static bool show_baseline_only; 28static bool show_baseline_only;
28static bool sort_compute; 29static bool sort_compute;
29 30
@@ -540,6 +541,8 @@ static const struct option options[] = {
540 "delta,ratio,wdiff:w1,w2 (default delta)", 541 "delta,ratio,wdiff:w1,w2 (default delta)",
541 "Entries differential computation selection", 542 "Entries differential computation selection",
542 setup_compute), 543 setup_compute),
544 OPT_BOOLEAN('p', "period", &show_period,
545 "Show period values."),
543 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, 546 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
544 "dump raw trace in ASCII"), 547 "dump raw trace in ASCII"),
545 OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), 548 OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
@@ -568,7 +571,7 @@ static void ui_init(void)
568 /* No overhead column. */ 571 /* No overhead column. */
569 perf_hpp__column_enable(PERF_HPP__OVERHEAD, false); 572 perf_hpp__column_enable(PERF_HPP__OVERHEAD, false);
570 573
571 /* Display baseline/delta/ratio/displacement columns. */ 574 /* Display baseline/delta/ratio/displacement/periods columns. */
572 perf_hpp__column_enable(PERF_HPP__BASELINE, true); 575 perf_hpp__column_enable(PERF_HPP__BASELINE, true);
573 576
574 switch (compute) { 577 switch (compute) {
@@ -587,6 +590,11 @@ static void ui_init(void)
587 590
588 if (show_displacement) 591 if (show_displacement)
589 perf_hpp__column_enable(PERF_HPP__DISPL, true); 592 perf_hpp__column_enable(PERF_HPP__DISPL, true);
593
594 if (show_period) {
595 perf_hpp__column_enable(PERF_HPP__PERIOD, true);
596 perf_hpp__column_enable(PERF_HPP__PERIOD_BASELINE, true);
597 }
590} 598}
591 599
592int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) 600int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)