]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
perf tools: Add sort__has_sym
authorNamhyung Kim <namhyung.kim@lge.com>
Fri, 14 Sep 2012 08:35:27 +0000 (17:35 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Sep 2012 16:08:59 +0000 (13:08 -0300)
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>
tools/perf/util/sort.c
tools/perf/util/sort.h

index 0981bc7a29172a1d950236b0bbff7a76e6b2276c..b5b1b9211960884efd1a4c707fa8c56910db01f1 100644 (file)
@@ -8,6 +8,7 @@ const char      default_sort_order[] = "comm,dso,symbol";
 const char     *sort_order = default_sort_order;
 int            sort__need_collapse = 0;
 int            sort__has_parent = 0;
+int            sort__has_sym = 0;
 int            sort__branch_mode = -1; /* -1 = means not set */
 
 enum sort_type sort__first_dimension;
@@ -511,6 +512,10 @@ int sort_dimension__add(const char *tok)
                                return -EINVAL;
                        }
                        sort__has_parent = 1;
+               } else if (sd->entry == &sort_sym ||
+                          sd->entry == &sort_sym_from ||
+                          sd->entry == &sort_sym_to) {
+                       sort__has_sym = 1;
                }
 
                if (sd->taken)
index e459c981b039fa8d9ec96c7ab48e75be4745da08..12d634792de511051decb3cfa7caf6458d60560c 100644 (file)
@@ -31,6 +31,7 @@ extern const char *parent_pattern;
 extern const char default_sort_order[];
 extern int sort__need_collapse;
 extern int sort__has_parent;
+extern int sort__has_sym;
 extern int sort__branch_mode;
 extern struct sort_entry sort_comm;
 extern struct sort_entry sort_dso;