Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234462
b: refs/heads/master
c: e603dc1
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Feb 22, 2011
1 parent da9cc7b commit 4f3c7f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 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: fbee632d0ca9f4073a3fefb9a843eac8af036b0f
refs/heads/master: e603dc15072c7fec0ae263597e6dabc3bb4c5c5b
15 changes: 13 additions & 2 deletions trunk/tools/perf/util/evsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,19 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,

for (cpu = 0; cpu < cpus->nr; cpu++) {
int group_fd = -1;

evsel->attr.inherit = (cpus->map[cpu] < 0) && inherit;
/*
* Don't allow mmap() of inherited per-task counters. This
* would create a performance issue due to all children writing
* to the same buffer.
*
* FIXME:
* Proper fix is not to pass 'inherit' to perf_evsel__open*,
* but a 'flags' parameter, with 'group' folded there as well,
* then introduce a PERF_O_{MMAP,GROUP,INHERIT} enum, and if
* O_MMAP is set, emit a warning if cpu < 0 and O_INHERIT is
* set. Lets go for the minimal fix first tho.
*/
evsel->attr.inherit = (cpus->map[cpu] >= 0) && inherit;

for (thread = 0; thread < threads->nr; thread++) {

Expand Down

0 comments on commit 4f3c7f8

Please sign in to comment.