summaryrefslogtreecommitdiffstats
path: root/tools/lib/api
diff options
context:
space:
mode:
authorWang Nan <wangnan0@huawei.com>2016-07-14 08:34:34 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-15 17:27:46 -0300
commit2b4383470675c85add72725cc08840d36b409276 (patch)
tree04f0c42117300ca2325be79aa514a4d29d2cac91 /tools/lib/api
parente81fcd43723d32e9c9dbb8e8d66f147b5b84256b (diff)
downloadlinux-2b4383470675c85add72725cc08840d36b409276.tar.bz2
tools lib fd array: Allow associating a pointer cookie with each entry
Add a 'ptr' field to fdarray->priv array. This feature will be used by following commits, which introduce muiltiple 'struct perf_mmap' arrays for different types of mapping. Because of this, during fdarray__filter(), a simple 'idx' is not enough. Add a pointer cookie that allows to directly associate a 'struct perf_mmap' pointer to an fdarray entry. Signed-off-by: Wang Nan <wangnan0@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nilay Vaish <nilayvaish@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1468485287-33422-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/api')
-rw-r--r--tools/lib/api/fd/array.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/api/fd/array.h b/tools/lib/api/fd/array.h
index e87fd800fa8d..71287dddc05f 100644
--- a/tools/lib/api/fd/array.h
+++ b/tools/lib/api/fd/array.h
@@ -22,6 +22,7 @@ struct fdarray {
struct pollfd *entries;
union {
int idx;
+ void *ptr;
} *priv;
};