lkml.org 
[lkml]   [2013]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: perf top -u <uid> does not seem to be working

an unrelated bug is a missing newline if the 'uid' is invalid:

hubble:~> perf top --stdio -u help
Error:
Invalid User: helphubble:~>

Fixed by the patch below.

comet:~/tip/tools/perf> perf top --stdio -u help
Error:
Invalid User: help
comet:~/tip/tools/perf>

Signed-off-by: Ingo Molnar <mingo@kernel.org>

tools/perf/builtin-top.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index b8f8e29..71e6402 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1172,7 +1172,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
status = target__validate(target);
if (status) {
target__strerror(target, status, errbuf, BUFSIZ);
- ui__warning("%s", errbuf);
+ ui__warning("%s\n", errbuf);
}

status = target__parse_uid(target);
@@ -1180,7 +1180,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
int saved_errno = errno;

target__strerror(target, status, errbuf, BUFSIZ);
- ui__error("%s", errbuf);
+ ui__error("%s\n", errbuf);

status = -saved_errno;
goto out_delete_evlist;


\
 
 \ /
  Last update: 2013-11-13 00:41    [W:0.105 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site