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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 1ca88896eee4..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)");
@@ -782,6 +784,7 @@ static const char *skip_symbols[] = {
782 "exit_idle", 784 "exit_idle",
783 "mwait_idle", 785 "mwait_idle",
784 "mwait_idle_with_hints", 786 "mwait_idle_with_hints",
787 "poll_idle",
785 "ppc64_runlatch_off", 788 "ppc64_runlatch_off",
786 "pseries_dedicated_idle_sleep", 789 "pseries_dedicated_idle_sleep",
787 NULL 790 NULL
@@ -1024,7 +1027,7 @@ try_again:
1024 if (fd[i][counter] < 0) { 1027 if (fd[i][counter] < 0) {
1025 int err = errno; 1028 int err = errno;
1026 1029
1027 if (err == EPERM) 1030 if (err == EPERM || err == EACCES)
1028 die("No permission - are you root?\n"); 1031 die("No permission - are you root?\n");
1029 /* 1032 /*
1030 * If it's cycles then fall back to hrtimer 1033 * If it's cycles then fall back to hrtimer