diff options
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r-- | tools/perf/builtin-diff.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 413c65a1ba39..a0b531c14b97 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -256,6 +256,21 @@ static const struct option options[] = { | |||
256 | OPT_END() | 256 | OPT_END() |
257 | }; | 257 | }; |
258 | 258 | ||
259 | static void ui_init(void) | ||
260 | { | ||
261 | perf_hpp__init(); | ||
262 | |||
263 | /* No overhead column. */ | ||
264 | perf_hpp__column_enable(PERF_HPP__OVERHEAD, false); | ||
265 | |||
266 | /* Display baseline/delta/displacement columns. */ | ||
267 | perf_hpp__column_enable(PERF_HPP__BASELINE, true); | ||
268 | perf_hpp__column_enable(PERF_HPP__DELTA, true); | ||
269 | |||
270 | if (show_displacement) | ||
271 | perf_hpp__column_enable(PERF_HPP__DISPL, true); | ||
272 | } | ||
273 | |||
259 | int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) | 274 | int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) |
260 | { | 275 | { |
261 | sort_order = diff__default_sort_order; | 276 | sort_order = diff__default_sort_order; |
@@ -278,7 +293,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) | |||
278 | if (symbol__init() < 0) | 293 | if (symbol__init() < 0) |
279 | return -1; | 294 | return -1; |
280 | 295 | ||
281 | perf_hpp__init(true, show_displacement); | 296 | ui_init(); |
297 | |||
282 | setup_sorting(diff_usage, options); | 298 | setup_sorting(diff_usage, options); |
283 | setup_pager(); | 299 | setup_pager(); |
284 | 300 | ||