diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-09-14 04:35:27 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-17 12:08:59 -0400 |
commit | 1af556406670f2076ea235ba8ba16da13d227e99 (patch) | |
tree | c1a3c85666400ccf640edd5b7b737f4d3a16f6ba | |
parent | 67d2591656df7a76d4cabca04f1cbe1c7d1c9b3a (diff) |
perf tools: Add sort__has_sym
The sort__has_sym variable is for checking whether the sort_list
includes 'symbol' as a sort key. It will be used for later patch.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1347611729-16994-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/sort.c | 5 | ||||
-rw-r--r-- | tools/perf/util/sort.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 0981bc7a2917..b5b1b9211960 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -8,6 +8,7 @@ const char default_sort_order[] = "comm,dso,symbol"; | |||
8 | const char *sort_order = default_sort_order; | 8 | const char *sort_order = default_sort_order; |
9 | int sort__need_collapse = 0; | 9 | int sort__need_collapse = 0; |
10 | int sort__has_parent = 0; | 10 | int sort__has_parent = 0; |
11 | int sort__has_sym = 0; | ||
11 | int sort__branch_mode = -1; /* -1 = means not set */ | 12 | int sort__branch_mode = -1; /* -1 = means not set */ |
12 | 13 | ||
13 | enum sort_type sort__first_dimension; | 14 | enum sort_type sort__first_dimension; |
@@ -511,6 +512,10 @@ int sort_dimension__add(const char *tok) | |||
511 | return -EINVAL; | 512 | return -EINVAL; |
512 | } | 513 | } |
513 | sort__has_parent = 1; | 514 | sort__has_parent = 1; |
515 | } else if (sd->entry == &sort_sym || | ||
516 | sd->entry == &sort_sym_from || | ||
517 | sd->entry == &sort_sym_to) { | ||
518 | sort__has_sym = 1; | ||
514 | } | 519 | } |
515 | 520 | ||
516 | if (sd->taken) | 521 | if (sd->taken) |
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index e459c981b039..12d634792de5 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h | |||
@@ -31,6 +31,7 @@ extern const char *parent_pattern; | |||
31 | extern const char default_sort_order[]; | 31 | extern const char default_sort_order[]; |
32 | extern int sort__need_collapse; | 32 | extern int sort__need_collapse; |
33 | extern int sort__has_parent; | 33 | extern int sort__has_parent; |
34 | extern int sort__has_sym; | ||
34 | extern int sort__branch_mode; | 35 | extern int sort__branch_mode; |
35 | extern struct sort_entry sort_comm; | 36 | extern struct sort_entry sort_comm; |
36 | extern struct sort_entry sort_dso; | 37 | extern struct sort_entry sort_dso; |