linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] perf: Allow closing siblings' file descriptors
@ 2020-07-08 15:16 Alexander Shishkin
  2020-07-08 15:16 ` [PATCH 1/2] perf: Add closing sibling events' " Alexander Shishkin
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Alexander Shishkin @ 2020-07-08 15:16 UTC (permalink / raw)
  To: Peter Zijlstra, Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Jiri Olsa, alexey.budankov,
	adrian.hunter, Alexander Shishkin

Hi guys,

I've been looking at reducing the number of open file descriptors per perf
session. If we retain one descriptor per event, in a large group they add
up. At the same time, we're not actually using them for anything after the
SET_OUTPUT and maybe SET_FILTER ioctls. So, this series is a stab at that.

So, I added a new flag to the perf_event_open() that tells perf to keep
the event around after its file descriptor gets closed, for as long as its
group leader is alive. Since this is a new behavior, the flag is an opt-in.

I also hacked this into the perf tool (mostly perf record, but I'll hack
stat as well if this general approach is agreeable).

Alexander Shishkin (2):
  perf: Add closing sibling events' file descriptors
  perf record: Support closing siblings' file descriptors

 include/linux/perf_event.h              |   7 ++
 include/uapi/linux/perf_event.h         |   1 +
 kernel/events/core.c                    | 149 +++++++++++++++++-------
 tools/include/uapi/linux/perf_event.h   |   1 +
 tools/lib/perf/evlist.c                 |  30 ++++-
 tools/lib/perf/evsel.c                  |  21 ++++
 tools/lib/perf/include/internal/evsel.h |   4 +
 tools/perf/builtin-record.c             |  48 ++++++--
 tools/perf/util/cpumap.c                |   4 +
 tools/perf/util/evlist.c                |   4 +-
 tools/perf/util/evsel.c                 |  17 ++-
 tools/perf/util/evsel.h                 |   3 +
 12 files changed, 234 insertions(+), 55 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-08-11 22:15 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 15:16 [PATCH 0/2] perf: Allow closing siblings' file descriptors Alexander Shishkin
2020-07-08 15:16 ` [PATCH 1/2] perf: Add closing sibling events' " Alexander Shishkin
2020-08-06  8:35   ` peterz
2020-08-06 15:32     ` Andi Kleen
2020-08-10 13:57       ` Alexander Shishkin
2020-08-10 14:45         ` Andi Kleen
2020-08-10 20:36           ` Peter Zijlstra
2020-08-11  8:12             ` Alexey Budankov
2020-08-11 14:29             ` Andi Kleen
2020-08-11 14:47               ` David Laight
2020-08-11 18:03                 ` Andi Kleen
2020-08-11 21:06                   ` David Laight
2020-08-11  9:47           ` Alexander Shishkin
2020-08-11 14:34             ` Andi Kleen
2020-08-11 16:21               ` Alexander Shishkin
2020-08-11 18:02                 ` Andi Kleen
2020-07-08 15:16 ` [PATCH 2/2] perf record: Support closing siblings' " Alexander Shishkin
2020-07-08 21:09   ` Jiri Olsa
2020-07-16  8:42   ` [perf record] d65f0cbbc6: perf-sanity-tests.Setup_struct_perf_event_attr.fail kernel test robot
2020-07-09  8:30 ` [PATCH 0/2] perf: Allow closing siblings' file descriptors Alexey Budankov
2020-08-06  6:15 ` Adrian Hunter
2020-08-06  8:37   ` peterz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).