libperf: Add perf_evlist__alloc_pollfd() function

Move perf_evlist__alloc_pollfd() from tools/perf to libperf, it will be
used in the following patches.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lore.kernel.org/lkml/20190913132355.21634-37-jolsa@kernel.org
[ Added api/fd/array.h include to the lib/evlist.c file ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa
2019-08-06 13:21:53 +02:00
committed by Arnaldo Carvalho de Melo
parent 379dd98c3d
commit 31f67fc462
4 changed files with 25 additions and 23 deletions

View File

@@ -24,6 +24,8 @@ struct perf_evlist {
struct hlist_head heads[PERF_EVLIST__HLIST_SIZE];
};
int perf_evlist__alloc_pollfd(struct perf_evlist *evlist);
/**
* __perf_evlist__for_each_entry - iterate thru all the evsels
* @list: list_head instance to iterate