Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444931

[tip:perf/core] tools lib fd array: Allow associating a pointer cookie with each entry

From tip-bot for Wang Nan <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:perf/core] tools lib fd array: Allow associating a pointer cookie with each entry
Date 2016-07-16 22:50 +0200
Message-ID <rVEH8-8rP-37@gated-at.bofh.it> (permalink)
References <rUKlC-7jX-83@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit-ID:  2b4383470675c85add72725cc08840d36b409276
Gitweb:     http://git.kernel.org/tip/2b4383470675c85add72725cc08840d36b409276
Author:     Wang Nan <wangnan0@huawei.com>
AuthorDate: Thu, 14 Jul 2016 08:34:34 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 15 Jul 2016 17:27:46 -0300

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>
---
 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 e87fd80..71287dd 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;
 };
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v16 00/15] perf tools: Support overwritable ring buffer Wang Nan <wangnan0@huawei.com> - 2016-07-14 10:40 +0200
  [PATCH v16 15/15] perf tools: Add --tail-synthesize option Wang Nan <wangnan0@huawei.com> - 2016-07-14 10:40 +0200
    [tip:perf/core] perf record: Add --tail-synthesize option tip-bot for Wang Nan <tipbot@zytor.com> - 2016-07-16 23:00 +0200
  [PATCH v16 05/15] perf tools: Record mmap cookie into fdarray private field Wang Nan <wangnan0@huawei.com> - 2016-07-14 10:40 +0200
    Re: [PATCH v16 05/15] perf tools: Record mmap cookie into fdarray  private field Jiri Olsa <jolsa@redhat.com> - 2016-07-15 17:00 +0200
    [tip:perf/core] perf evlist: Record mmap cookie into fdarray  private field tip-bot for Wang Nan <tipbot@zytor.com> - 2016-07-16 22:50 +0200
  [PATCH v16 02/15] tools lib fd array: Allow associating a pointer cookie with each entry Wang Nan <wangnan0@huawei.com> - 2016-07-14 10:40 +0200
    [tip:perf/core] tools lib fd array: Allow associating a pointer  cookie with each entry tip-bot for Wang Nan <tipbot@zytor.com> - 2016-07-16 22:50 +0200
  [PATCH v16 10/15] perf tools: Setup backward mmap state machine Wang Nan <wangnan0@huawei.com> - 2016-07-14 10:40 +0200
    [tip:perf/core] perf evlist: Setup backward mmap state machine tip-bot for Wang Nan <tipbot@zytor.com> - 2016-07-16 22:50 +0200
  [PATCH v16 03/15] perf tools: Update perf evlist mmap related APIs and helpers Wang Nan <wangnan0@huawei.com> - 2016-07-14 10:40 +0200
    [tip:perf/core] perf evlist: Update mmap related APIs and helpers tip-bot for Wang Nan <tipbot@zytor.com> - 2016-07-16 22:50 +0200
  [PATCH v16 08/15] perf tools: Map backward events to backward_mmap Wang Nan <wangnan0@huawei.com> - 2016-07-14 10:40 +0200
    [tip:perf/core] perf evlist: Map backward events to backward_mmap tip-bot for Wang Nan <tipbot@zytor.com> - 2016-07-16 22:50 +0200
  Re: [PATCH v16 00/15] perf tools: Support overwritable ring buffer Jiri Olsa <jolsa@redhat.com> - 2016-07-15 17:10 +0200

csiph-web