From 0774f544a779f963b190faa6e8fcfc49c2512eb2 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sun, 7 Jun 2009 17:46:24 +0200 Subject: [PATCH] --- yaml --- r: 147699 b: refs/heads/master c: 30c806a094493beb7691bc7957dfa02dee96230a h: refs/heads/master i: 147697: 14be5427cf663d202638137b5ad637ecd44a646c 147695: a2b1964ae0713a9686096b7c2eb4d9c88cb54860 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-record.c | 7 ++++--- trunk/tools/perf/builtin-top.c | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index bb5b40a81d85..8f86d28d72fd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3da297a60f7e8840f79f7d0b343af078890939ea +refs/heads/master: 30c806a094493beb7691bc7957dfa02dee96230a diff --git a/trunk/tools/perf/builtin-record.c b/trunk/tools/perf/builtin-record.c index 87866294a0e6..deaee42d5eb0 100644 --- a/trunk/tools/perf/builtin-record.c +++ b/trunk/tools/perf/builtin-record.c @@ -356,9 +356,6 @@ static void create_counter(int counter, int cpu, pid_t pid) if (fd[nr_cpu][counter] < 0) { int err = errno; - if (verbose) - error("sys_perf_counter_open() syscall returned with %d (%s)\n", - fd[nr_cpu][counter], strerror(err)); if (err == EPERM) die("Permission error - are you root?\n"); @@ -376,6 +373,10 @@ static void create_counter(int counter, int cpu, pid_t pid) attr->config = PERF_COUNT_CPU_CLOCK; goto try_again; } + printf("\n"); + error("perfcounter syscall returned with %d (%s)\n", + fd[nr_cpu][counter], strerror(err)); + die("No CONFIG_PERF_COUNTERS=y kernel support configured?\n"); exit(-1); } diff --git a/trunk/tools/perf/builtin-top.c b/trunk/tools/perf/builtin-top.c index 1f8c97d5c32e..be1698f1189b 100644 --- a/trunk/tools/perf/builtin-top.c +++ b/trunk/tools/perf/builtin-top.c @@ -551,10 +551,6 @@ static void start_counter(int i, int counter) if (fd[i][counter] < 0) { int err = errno; - if (verbose) - error("sys_perf_counter_open() syscall returned with %d (%s)\n", - fd[i][counter], strerror(err)); - if (err == EPERM) die("No permission - are you root?\n"); /* @@ -572,6 +568,10 @@ static void start_counter(int i, int counter) attr->config = PERF_COUNT_CPU_CLOCK; goto try_again; } + printf("\n"); + error("perfcounter syscall returned with %d (%s)\n", + fd[i][counter], strerror(err)); + die("No CONFIG_PERF_COUNTERS=y kernel support configured?\n"); exit(-1); } assert(fd[i][counter] >= 0);