perf tools: Centralize default columns init in perf_hpp__init
authorJiri Olsa <jolsa@redhat.com>
Thu, 31 Jan 2013 22:34:25 +0000 (23:34 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 12 Jul 2013 16:53:59 +0000 (13:53 -0300)
Now when diff command is separated from other standard outputs,
we can use perf_hpp__init to initialize all standard columns.

Moving PERF_HPP__OVERHEAD column init back to perf_hpp__init,
and removing extra enable calls.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
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-nj2xk89tj972tbqswfs498ex@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-report.c
tools/perf/ui/browsers/hists.c
tools/perf/ui/hist.c
tools/perf/ui/setup.c

index 9a7e54d701cf64c1f01ce27a5a2df9c1e140861a..188c265751c88123be6cb4429e835d0e8be796af 100644 (file)
@@ -861,7 +861,6 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
                setup_browser(true);
        else {
                use_browser = 0;
-               perf_hpp__column_enable(PERF_HPP__OVERHEAD);
                perf_hpp__init();
        }
 
index 2cb39164a1cd7f7dd292fafba4716f8f044a451c..7ef36c360471e3f2ccef82d4bd2a4e4fb684eb14 100644 (file)
@@ -703,8 +703,6 @@ __HPP_COLOR_PERCENT_FN(overhead_guest_us, period_guest_us, NULL)
 
 void hist_browser__init_hpp(void)
 {
-       perf_hpp__column_enable(PERF_HPP__OVERHEAD);
-
        perf_hpp__init();
 
        perf_hpp__format[PERF_HPP__OVERHEAD].color =
index 5440d56d884ae1f92104b69c455a34e415fd5d33..f45c97f694dac452f7b9ea4f12a1d4a6877a5523 100644 (file)
@@ -421,6 +421,8 @@ LIST_HEAD(perf_hpp__list);
 
 void perf_hpp__init(void)
 {
+       perf_hpp__column_enable(PERF_HPP__OVERHEAD);
+
        if (symbol_conf.show_cpu_utilization) {
                perf_hpp__column_enable(PERF_HPP__OVERHEAD_SYS);
                perf_hpp__column_enable(PERF_HPP__OVERHEAD_US);
index ae6a789cb0f62780a9fa088f7fe99939c798ef2d..47d9a571f261da9c65e36aa82f8dbdb70a838acc 100644 (file)
@@ -30,7 +30,6 @@ void setup_browser(bool fallback_to_pager)
                if (fallback_to_pager)
                        setup_pager();
 
-               perf_hpp__column_enable(PERF_HPP__OVERHEAD);
                perf_hpp__init();
                break;
        }