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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 1f8c97d5c32e..be1698f1189b 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -551,10 +551,6 @@ try_again:
551 if (fd[i][counter] < 0) { 551 if (fd[i][counter] < 0) {
552 int err = errno; 552 int err = errno;
553 553
554 if (verbose)
555 error("sys_perf_counter_open() syscall returned with %d (%s)\n",
556 fd[i][counter], strerror(err));
557
558 if (err == EPERM) 554 if (err == EPERM)
559 die("No permission - are you root?\n"); 555 die("No permission - are you root?\n");
560 /* 556 /*
@@ -572,6 +568,10 @@ try_again:
572 attr->config = PERF_COUNT_CPU_CLOCK; 568 attr->config = PERF_COUNT_CPU_CLOCK;
573 goto try_again; 569 goto try_again;
574 } 570 }
571 printf("\n");
572 error("perfcounter syscall returned with %d (%s)\n",
573 fd[i][counter], strerror(err));
574 die("No CONFIG_PERF_COUNTERS=y kernel support configured?\n");
575 exit(-1); 575 exit(-1);
576 } 576 }
577 assert(fd[i][counter] >= 0); 577 assert(fd[i][counter] >= 0);