aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-08-18 16:44:06 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-09-25 16:46:54 -0300
commitad6765dd3b2f043e819bdec565db8f5a2f781e06 (patch)
tree0fb445dcb26922b043d240e6f087d15fe7269c2a /tools/perf/util/evlist.h
parentperf evlist: We need to poll all event file descriptors (diff)
downloadlinux-dev-ad6765dd3b2f043e819bdec565db8f5a2f781e06.tar.xz
linux-dev-ad6765dd3b2f043e819bdec565db8f5a2f781e06.zip
perf evlist: Allow growing pollfd on add method
This way we will be able to add more file descriptors to be polled, like stdin or some timer fd. At this point we might as well yank the pollfd class from evlist so that it can be used in other places. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-o2mzsjl7taumsoc35ryol00i@git.kernel.org 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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 1082420951f9..bbc2fd01b5c5 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -30,6 +30,7 @@ struct perf_evlist {
int nr_entries;
int nr_groups;
int nr_fds;
+ int nr_fds_alloc;
int nr_mmaps;
size_t mmap_len;
int id_pos;
@@ -82,8 +83,8 @@ perf_evlist__find_tracepoint_by_name(struct perf_evlist *evlist,
void perf_evlist__id_add(struct perf_evlist *evlist, struct perf_evsel *evsel,
int cpu, int thread, u64 id);
-void perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd);
-
+int perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd);
+int perf_evlist__alloc_pollfd(struct perf_evlist *evlist);
int perf_evlist__filter_pollfd(struct perf_evlist *evlist, short revents_and_mask);
struct perf_evsel *perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id);