aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 37512e936235..e23bc74e734f 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -686,6 +686,8 @@ static void handle_keypress(int c)
686 switch (c) { 686 switch (c) {
687 case 'd': 687 case 'd':
688 prompt_integer(&delay_secs, "Enter display delay"); 688 prompt_integer(&delay_secs, "Enter display delay");
689 if (delay_secs < 1)
690 delay_secs = 1;
689 break; 691 break;
690 case 'e': 692 case 'e':
691 prompt_integer(&print_entries, "Enter display entries (lines)"); 693 prompt_integer(&print_entries, "Enter display entries (lines)");
@@ -1025,7 +1027,7 @@ try_again:
1025 if (fd[i][counter] < 0) { 1027 if (fd[i][counter] < 0) {
1026 int err = errno; 1028 int err = errno;
1027 1029
1028 if (err == EPERM) 1030 if (err == EPERM || err == EACCES)
1029 die("No permission - are you root?\n"); 1031 die("No permission - are you root?\n");
1030 /* 1032 /*
1031 * If it's cycles then fall back to hrtimer 1033 * If it's cycles then fall back to hrtimer