diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-06-02 09:39:43 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-06-03 09:05:23 -0400 |
commit | d21cc9f67d689effbfd24bac878bc2c057de8c46 (patch) | |
tree | 24b0f76ac764ca708923045dbe617875a9a09ea2 /tools | |
parent | 1fa7b6a29c61358cc2ca6f64cef4aa0e1a7ca74c (diff) |
perf evlist: Remove dependency on debug routines
So far we avoided having to link debug.o in the python binding, keep it
that way by not using ui__warning() in evlist.c.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-4wtew8hd3g7ejnlehtspys2t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/evlist.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 50aa34879c33..04c8a60075b3 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include "evlist.h" | 12 | #include "evlist.h" |
13 | #include "evsel.h" | 13 | #include "evsel.h" |
14 | #include "util.h" | 14 | #include "util.h" |
15 | #include "debug.h" | ||
16 | 15 | ||
17 | #include <sys/mman.h> | 16 | #include <sys/mman.h> |
18 | 17 | ||
@@ -257,19 +256,15 @@ int perf_evlist__alloc_mmap(struct perf_evlist *evlist) | |||
257 | return evlist->mmap != NULL ? 0 : -ENOMEM; | 256 | return evlist->mmap != NULL ? 0 : -ENOMEM; |
258 | } | 257 | } |
259 | 258 | ||
260 | static int __perf_evlist__mmap(struct perf_evlist *evlist, struct perf_evsel *evsel, | 259 | static int __perf_evlist__mmap(struct perf_evlist *evlist, |
261 | int idx, int prot, int mask, int fd) | 260 | int idx, int prot, int mask, int fd) |
262 | { | 261 | { |
263 | evlist->mmap[idx].prev = 0; | 262 | evlist->mmap[idx].prev = 0; |
264 | evlist->mmap[idx].mask = mask; | 263 | evlist->mmap[idx].mask = mask; |
265 | evlist->mmap[idx].base = mmap(NULL, evlist->mmap_len, prot, | 264 | evlist->mmap[idx].base = mmap(NULL, evlist->mmap_len, prot, |
266 | MAP_SHARED, fd, 0); | 265 | MAP_SHARED, fd, 0); |
267 | if (evlist->mmap[idx].base == MAP_FAILED) { | 266 | if (evlist->mmap[idx].base == MAP_FAILED) |
268 | if (evlist->cpus->map[idx] == -1 && evsel->attr.inherit) | ||
269 | ui__warning("Inherit is not allowed on per-task " | ||
270 | "events using mmap.\n"); | ||
271 | return -1; | 267 | return -1; |
272 | } | ||
273 | 268 | ||
274 | perf_evlist__add_pollfd(evlist, fd); | 269 | perf_evlist__add_pollfd(evlist, fd); |
275 | return 0; | 270 | return 0; |
@@ -289,7 +284,7 @@ static int perf_evlist__mmap_per_cpu(struct perf_evlist *evlist, int prot, int m | |||
289 | 284 | ||
290 | if (output == -1) { | 285 | if (output == -1) { |
291 | output = fd; | 286 | output = fd; |
292 | if (__perf_evlist__mmap(evlist, evsel, cpu, | 287 | if (__perf_evlist__mmap(evlist, cpu, |
293 | prot, mask, output) < 0) | 288 | prot, mask, output) < 0) |
294 | goto out_unmap; | 289 | goto out_unmap; |
295 | } else { | 290 | } else { |
@@ -329,7 +324,7 @@ static int perf_evlist__mmap_per_thread(struct perf_evlist *evlist, int prot, in | |||
329 | 324 | ||
330 | if (output == -1) { | 325 | if (output == -1) { |
331 | output = fd; | 326 | output = fd; |
332 | if (__perf_evlist__mmap(evlist, evsel, thread, | 327 | if (__perf_evlist__mmap(evlist, thread, |
333 | prot, mask, output) < 0) | 328 | prot, mask, output) < 0) |
334 | goto out_unmap; | 329 | goto out_unmap; |
335 | } else { | 330 | } else { |