Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444586
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 09/24] tools lib fd array: Allow associating a pointer cookie with each entry |
| Date | 2016-07-15 23:00 +0200 |
| Message-ID | <rVinh-38N-57@gated-at.bofh.it> (permalink) |
| References | <rVinf-38N-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Wang Nan <wangnan0@huawei.com>
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>
---
tools/lib/api/fd/array.h | 1 +
1 file changed, 1 insertion(+)
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;
};
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/24] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 06/24] tools lib api fs: Use base 0 in filename__read_ull Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 17/24] perf evlist: Setup backward mmap state machine Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 20/24] perf tools: Enable overwrite settings Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 16/24] perf evlist: Drop evlist->backward Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 10/24] perf evlist: Update mmap related APIs and helpers Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 13/24] perf evlist: Extract common code in mmap failure processing Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 09/24] tools lib fd array: Allow associating a pointer cookie with each entry Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 02/24] perf tools: Do not provide dup sched_getcpu() prototype on Android Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 [PATCH 08/24] tools: Simplify BITS_PER_LONG define Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-15 23:00 +0200 Re: [GIT PULL 00/24] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-07-16 22:40 +0200
csiph-web