From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752806AbdLFQqt (ORCPT ); Wed, 6 Dec 2017 11:46:49 -0500 Received: from terminus.zytor.com ([65.50.211.136]:55339 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752457AbdLFQqj (ORCPT ); Wed, 6 Dec 2017 11:46:39 -0500 Date: Wed, 6 Dec 2017 08:44:31 -0800 From: tip-bot for Seokho Song Message-ID: Cc: acme@redhat.com, jolsa@kernel.org, mingo@kernel.org, 0xdevssh@gmail.com, namhyung@kernel.org, qkrwngud825@gmail.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com Reply-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, qkrwngud825@gmail.com, hpa@zytor.com, mingo@kernel.org, jolsa@kernel.org, acme@redhat.com, namhyung@kernel.org, 0xdevssh@gmail.com In-Reply-To: <20171204160244.6332-1-0xdevssh@gmail.com> References: <20171204160244.6332-1-0xdevssh@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf report: Set browser mode right before setup_browser() Git-Commit-ID: 712d36db5a5c57eb79e962a0f9b85964640e8415 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 712d36db5a5c57eb79e962a0f9b85964640e8415 Gitweb: https://git.kernel.org/tip/712d36db5a5c57eb79e962a0f9b85964640e8415 Author: Seokho Song <0xdevssh@gmail.com> AuthorDate: Tue, 5 Dec 2017 01:02:44 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:43:56 -0300 perf report: Set browser mode right before setup_browser() There are codes that print messages to the screen between assignment of the use_browser variable and setup_browser(). But since the GUI browser is not initialized during that period, all messages fail to show if the user passed the --gtk option to perf as GTK is not initialized yet. Reorder the code to assign use_browser variable right before setup_browser() is called. Signed-off-by: Seokho Song <0xdevssh@gmail.com> Acked-by: Namhyung Kim Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20171204160244.6332-1-0xdevssh@gmail.com Signed-off-by: Park Ju Hyung Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-report.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index af5dd03..eb9ce63 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -921,13 +921,6 @@ int cmd_report(int argc, const char **argv) return -EINVAL; } - if (report.use_stdio) - use_browser = 0; - else if (report.use_tui) - use_browser = 1; - else if (report.use_gtk) - use_browser = 2; - if (report.inverted_callchain) callchain_param.order = ORDER_CALLER; if (symbol_conf.cumulate_callchain && !callchain_param.order_set) @@ -1014,6 +1007,13 @@ repeat: perf_hpp_list.need_collapse = true; } + if (report.use_stdio) + use_browser = 0; + else if (report.use_tui) + use_browser = 1; + else if (report.use_gtk) + use_browser = 2; + /* Force tty output for header output and per-thread stat. */ if (report.header || report.header_only || report.show_threads) use_browser = 0;