Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147699
b: refs/heads/master
c: 30c806a
h: refs/heads/master
i:
  147697: 14be542
  147695: a2b1964
v: v3
  • Loading branch information
Ingo Molnar committed Jun 7, 2009
1 parent 1287196 commit 0774f54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3da297a60f7e8840f79f7d0b343af078890939ea
refs/heads/master: 30c806a094493beb7691bc7957dfa02dee96230a
7 changes: 4 additions & 3 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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);
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
/*
Expand All @@ -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);
Expand Down

0 comments on commit 0774f54

Please sign in to comment.