From: Arnaldo Carvalho de Melo <a...@redhat.com>

Because it will require that we read the current machine CPU topology
map when the tool is not processing a perf.data file, from where it
would obtain that map.

Other tools may want to do some other initialization in such case.

We need to have a better way to figure out if a given sort key is being
used, perhaps a bitmap, but that is left for another patch.

Cc: Adrian Hunter <adrian.hun...@intel.com>
Cc: Borislav Petkov <b...@suse.de>
Cc: David Ahern <dsah...@gmail.com>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Kan Liang <kan.li...@intel.com>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Stephane Eranian <eran...@google.com>
Cc: Wang Nan <wangn...@huawei.com>
Link: http://lkml.kernel.org/n/tip-zv0php3505x6lq8zpljz1...@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>
---
 tools/perf/util/sort.c | 3 +++
 tools/perf/util/sort.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 5e4ed1779f6f..6b9556d298c9 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -21,6 +21,7 @@ int           sort__need_collapse = 0;
 int            sort__has_parent = 0;
 int            sort__has_sym = 0;
 int            sort__has_dso = 0;
+int            sort__has_socket = 0;
 enum sort_mode sort__mode = SORT_MODE__NORMAL;
 
 
@@ -1572,6 +1573,8 @@ int sort_dimension__add(const char *tok)
 
                } else if (sd->entry == &sort_dso) {
                        sort__has_dso = 1;
+               } else if (sd->entry == &sort_socket) {
+                       sort__has_socket = 1;
                }
 
                return __sort_dimension__add(sd);
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 654ac8a2c565..c06b75746613 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -34,6 +34,7 @@ extern int have_ignore_callees;
 extern int sort__need_collapse;
 extern int sort__has_parent;
 extern int sort__has_sym;
+extern int sort__has_socket;
 extern enum sort_mode sort__mode;
 extern struct sort_entry sort_comm;
 extern struct sort_entry sort_dso;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to