summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-03-18 11:31:39 +0900
committerJiri Olsa <jolsa@kernel.org>2014-05-21 11:45:35 +0200
commit512ae1bd6acb811c72e44e2540099eccd31f773d (patch)
treedce8f54594f284e88b113ffd60584869dcb32479 /tools/perf/builtin-diff.c
parenta2ce067e55e328f1a6fe3dddf77a173381ffdfe1 (diff)
downloadop-kernel-dev-512ae1bd6acb811c72e44e2540099eccd31f773d.zip
op-kernel-dev-512ae1bd6acb811c72e44e2540099eccd31f773d.tar.gz
perf tools: Consolidate management of default sort orders
The perf uses different default sort orders for different use-cases, and this was scattered throughout the code. Add get_default_sort_ order() function to handle this and change initial value of sort_order to NULL to distinguish it from user-given one. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1400480762-22852-10-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index b60c711..8bff543 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -60,7 +60,6 @@ static int data__files_cnt;
#define data__for_each_file(i, d) data__for_each_file_start(i, d, 0)
#define data__for_each_file_new(i, d) data__for_each_file_start(i, d, 1)
-static char diff__default_sort_order[] = "dso,symbol";
static bool force;
static bool show_period;
static bool show_formula;
@@ -1142,7 +1141,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
{
perf_config(perf_default_config, NULL);
- sort_order = diff__default_sort_order;
argc = parse_options(argc, argv, options, diff_usage, 0);
if (symbol__init() < 0)
@@ -1153,6 +1151,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
ui_init();
+ sort__mode = SORT_MODE__DIFF;
+
if (setup_sorting() < 0)
usage_with_options(diff_usage, options);
OpenPOWER on IntegriCloud