[tip:perf/core] perf top: Move UI initialization ahead of sort setup

2016-02-04 Thread tip-bot for Arnaldo Carvalho de Melo
Commit-ID:  3ee60c3b18bd4bf30ea9b70e7542116bb5c205ba
Gitweb: http://git.kernel.org/tip/3ee60c3b18bd4bf30ea9b70e7542116bb5c205ba
Author: Arnaldo Carvalho de Melo 
AuthorDate: Mon, 18 Jan 2016 10:24:06 +0100
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Wed, 3 Feb 2016 12:24:03 -0300

perf top: Move UI initialization ahead of sort setup

The ui initialization changes hpp format callbacks, based on the used
browser. Thus we need this init being processed before setup_sorting.

Replica of a patch by Jiri for 'perf report'.

Cc: David Ahern 
Cc: Jiri Olsa 
Cc: Namhyung Kim 
Cc: Peter Zijlstra 
Link: http://lkml.kernel.org/r/1453109064-1026-9-git-send-email-jo...@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/builtin-top.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index f1bbe2a..a75de39 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1245,6 +1245,13 @@ int cmd_top(int argc, const char **argv, const char 
*prefix __maybe_unused)
/* display thread wants entries to be collapsed in a different tree */
sort__need_collapse = 1;
 
+   if (top.use_stdio)
+   use_browser = 0;
+   else if (top.use_tui)
+   use_browser = 1;
+
+   setup_browser(false);
+
if (setup_sorting(top.evlist) < 0) {
if (sort_order)
parse_options_usage(top_usage, options, "s", 1);
@@ -1254,13 +1261,6 @@ int cmd_top(int argc, const char **argv, const char 
*prefix __maybe_unused)
goto out_delete_evlist;
}
 
-   if (top.use_stdio)
-   use_browser = 0;
-   else if (top.use_tui)
-   use_browser = 1;
-
-   setup_browser(false);
-
status = target__validate(target);
if (status) {
target__strerror(target, status, errbuf, BUFSIZ);


[tip:perf/core] perf top: Move UI initialization ahead of sort setup

2016-02-04 Thread tip-bot for Arnaldo Carvalho de Melo
Commit-ID:  3ee60c3b18bd4bf30ea9b70e7542116bb5c205ba
Gitweb: http://git.kernel.org/tip/3ee60c3b18bd4bf30ea9b70e7542116bb5c205ba
Author: Arnaldo Carvalho de Melo 
AuthorDate: Mon, 18 Jan 2016 10:24:06 +0100
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Wed, 3 Feb 2016 12:24:03 -0300

perf top: Move UI initialization ahead of sort setup

The ui initialization changes hpp format callbacks, based on the used
browser. Thus we need this init being processed before setup_sorting.

Replica of a patch by Jiri for 'perf report'.

Cc: David Ahern 
Cc: Jiri Olsa 
Cc: Namhyung Kim 
Cc: Peter Zijlstra 
Link: http://lkml.kernel.org/r/1453109064-1026-9-git-send-email-jo...@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/builtin-top.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index f1bbe2a..a75de39 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1245,6 +1245,13 @@ int cmd_top(int argc, const char **argv, const char 
*prefix __maybe_unused)
/* display thread wants entries to be collapsed in a different tree */
sort__need_collapse = 1;
 
+   if (top.use_stdio)
+   use_browser = 0;
+   else if (top.use_tui)
+   use_browser = 1;
+
+   setup_browser(false);
+
if (setup_sorting(top.evlist) < 0) {
if (sort_order)
parse_options_usage(top_usage, options, "s", 1);
@@ -1254,13 +1261,6 @@ int cmd_top(int argc, const char **argv, const char 
*prefix __maybe_unused)
goto out_delete_evlist;
}
 
-   if (top.use_stdio)
-   use_browser = 0;
-   else if (top.use_tui)
-   use_browser = 1;
-
-   setup_browser(false);
-
status = target__validate(target);
if (status) {
target__strerror(target, status, errbuf, BUFSIZ);