diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-11 19:30:02 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-22 16:56:28 -0500 |
commit | 5c581041cf97aa7980b442de81ddea8273d6dcde (patch) | |
tree | ceb2f13de102215d151adf7aaab975bd0db6076b /tools/perf/util/evlist.h | |
parent | 361c99a661a78ed22264649440e87fe4fe8da1f2 (diff) |
perf evlist: Adopt the pollfd array
Allocating just the space needed for nr_cpus * nr_threads * nr_evsels,
not the MAX_NR_CPUS and counters.
LKML-Reference: <new-submission>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.h')
-rw-r--r-- | tools/perf/util/evlist.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 48db91a8abf3..a7d7e122e3c6 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h | |||
@@ -3,9 +3,13 @@ | |||
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | 5 | ||
6 | struct pollfd; | ||
7 | |||
6 | struct perf_evlist { | 8 | struct perf_evlist { |
7 | struct list_head entries; | 9 | struct list_head entries; |
8 | int nr_entries; | 10 | int nr_entries; |
11 | int nr_fds; | ||
12 | struct pollfd *pollfd; | ||
9 | }; | 13 | }; |
10 | 14 | ||
11 | struct perf_evsel; | 15 | struct perf_evsel; |
@@ -16,4 +20,6 @@ void perf_evlist__delete(struct perf_evlist *evlist); | |||
16 | void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry); | 20 | void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry); |
17 | int perf_evlist__add_default(struct perf_evlist *evlist); | 21 | int perf_evlist__add_default(struct perf_evlist *evlist); |
18 | 22 | ||
23 | int perf_evlist__alloc_pollfd(struct perf_evlist *evlist, int ncpus, int nthreads); | ||
24 | |||
19 | #endif /* __PERF_EVLIST_H */ | 25 | #endif /* __PERF_EVLIST_H */ |