mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 07/11] perf ui: Rename ui__warning_paranoid to ui__error_paranoid
Date: Wed, 26 Oct 2011 15:48:30 -0200	[thread overview]
Message-ID: <1319651314-29404-8-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1319651314-29404-1-git-send-email-acme@infradead.org>

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

As it will exit the tool after the user is notified.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vy06m8xzlvkhr8tk7nylhbng@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c |    2 +-
 tools/perf/builtin-top.c    |    2 +-
 tools/perf/util/debug.c     |    4 ++--
 tools/perf/util/debug.h     |    6 ++++--
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 40088a5..6ab58cc 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -298,7 +298,7 @@ try_again:
 			int err = errno;
 
 			if (err == EPERM || err == EACCES) {
-				ui__warning_paranoid();
+				ui__error_paranoid();
 				exit(EXIT_FAILURE);
 			} else if (err ==  ENODEV && cpu_list) {
 				die("No such device - did you specify"
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index d2fc754..31aa82c 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -871,7 +871,7 @@ try_again:
 			int err = errno;
 
 			if (err == EPERM || err == EACCES) {
-				ui__warning_paranoid();
+				ui__error_paranoid();
 				goto out_err;
 			}
 			/*
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 155749d..5563403 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -57,9 +57,9 @@ void ui__warning(const char *format, ...)
 }
 #endif
 
-void ui__warning_paranoid(void)
+void ui__error_paranoid(void)
 {
-	ui__warning("Permission error - are you root?\n"
+	ui__error("Permission error - are you root?\n"
 		    "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n"
 		    " -1 - Not paranoid at all\n"
 		    "  0 - Disallow raw tracepoint access for unpriv\n"
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index 9c59b95..16cc752 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -21,14 +21,16 @@ static inline int ui_helpline__show_help(const char *format __used, va_list ap _
 
 static inline void ui_progress__update(u64 curr __used, u64 total __used,
 				       const char *title __used) {}
+
+#define ui__error(format, arg...) ui__warning(format, ##arg)
 #else
 extern char ui_helpline__last_msg[];
 int ui_helpline__show_help(const char *format, va_list ap);
 #include "ui/progress.h"
+void ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
 #endif
 
 void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
-void ui__warning_paranoid(void);
-void ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
+void ui__error_paranoid(void);
 
 #endif	/* __PERF_DEBUG_H */
-- 
1.6.2.5


  parent reply	other threads:[~2011-10-26 17:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26 17:48 [GIT PULL 00/11] perf/core fixes and improvements Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 01/11] perf evlist: Fix grouping of multiple events Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 02/11] perf ui progress: Reimplement using slang Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 03/11] perf ui: Improve handling sigwinch a bit Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 04/11] perf ui: Reimplement ui_helpline using libslang Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 05/11] perf ui: Reimplement ui__popup_menu using ui__browser Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 06/11] perf ui: Reimplement the popup windows using libslang Arnaldo Carvalho de Melo
2011-10-26 17:48 ` Arnaldo Carvalho de Melo [this message]
2011-10-26 17:48 ` [PATCH 08/11] perf hists browser: Use K_TIMER Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 09/11] perf ui browser: No need to switch char sets that often Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 10/11] perf ui browser: Handle K_RESIZE in dialog windows Arnaldo Carvalho de Melo
2011-10-26 17:48 ` [PATCH 11/11] perf header: Fix build on old systems Arnaldo Carvalho de Melo
2011-10-27  7:12 ` [GIT PULL 00/11] perf/core fixes and improvements 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=1319651314-29404-8-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®