From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Borislav Petkov <bp@suse.de>, David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 7/8] perf ui tui: Register the error callbacks before initializing the widgets
Date: Thu, 22 Oct 2015 19:14:34 -0300	[thread overview]
Message-ID: <1445552075-25155-8-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1445552075-25155-1-git-send-email-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
I.e. we want to tell the user about errors found during, for instance,
the ui_browser initialization, so that a call to ui__warning() appears
as a window waiting for a key to be pressed.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ederrwizcl6mfz10vfobl5qq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/tui/setup.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index 60d1f29b4b50..7dfeba0a91f3 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -141,10 +141,6 @@ int ui__init(void)
 
 	SLkp_define_keysym((char *)"^(kB)", SL_KEY_UNTAB);
 
-	ui_helpline__init();
-	ui_browser__init();
-	tui_progress__init();
-
 	signal(SIGSEGV, ui__signal_backtrace);
 	signal(SIGFPE, ui__signal_backtrace);
 	signal(SIGINT, ui__signal);
@@ -153,6 +149,10 @@ int ui__init(void)
 
 	perf_error__register(&perf_tui_eops);
 
+	ui_helpline__init();
+	ui_browser__init();
+	tui_progress__init();
+
 	hist_browser__init_hpp();
 out:
 	return err;
-- 
2.1.0
next prev parent reply	other threads:[~2015-10-22 22:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 22:14 [GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-10-22 22:14 ` [PATCH 1/8] tools lib traceevent: Support %ps/%pS Arnaldo Carvalho de Melo
2015-10-22 22:14 ` [PATCH 2/8] perf tools: Move callchain help messages to callchain.h Arnaldo Carvalho de Melo
2015-10-22 22:14 ` [PATCH 3/8] perf top: Support call-graph display options also Arnaldo Carvalho de Melo
2015-10-22 22:14 ` [PATCH 4/8] perf tools: Defaults to 'caller' callchain order only if --children is enabled Arnaldo Carvalho de Melo
2015-10-22 22:14 ` [PATCH 5/8] perf tools: Improve call graph documents and help messages Arnaldo Carvalho de Melo
2015-10-22 22:14 ` [PATCH 6/8] perf annotate: Fix 'annotate.use_offset' config variable usage Arnaldo Carvalho de Melo
2015-10-22 22:14 ` Arnaldo Carvalho de Melo [this message]
2015-10-22 22:14 ` [PATCH 8/8] perf annotate: Don't die() when finding an invalid config option Arnaldo Carvalho de Melo
2015-10-23  8:28 ` [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1445552075-25155-8-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).