Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252663
b: refs/heads/master
c: 4af4c95
h: refs/heads/master
i:
  252661: c51785e
  252659: 079f15a
  252655: e206ae2
v: v3
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed May 27, 2011
1 parent 187b5f3 commit 0222666
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 646aaea615704010b5fd2c8c8891ff1a3a4b4f1a
refs/heads/master: 4af4c9550ccaaf0b53013ff730bc15068ffe6abc
10 changes: 10 additions & 0 deletions trunk/tools/perf/util/evsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx)

int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads)
{
int cpu, thread;
evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int));

if (evsel->fd) {
for (cpu = 0; cpu < ncpus; cpu++) {
for (thread = 0; thread < nthreads; thread++) {
FD(evsel, cpu, thread) = -1;
}
}
}

return evsel->fd != NULL ? 0 : -ENOMEM;
}

Expand Down

0 comments on commit 0222666

Please sign in to comment.