summaryrefslogtreecommitdiff
path: root/include/uapi/linux/perf_event.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2021-04-08 13:35:58 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-04-16 17:32:40 +0300
commit2b26f0aa004995f49f7b6f4100dd0e4c39a9ed5f (patch)
tree27077a92806b93fffb58a3eaf0fad81cbf2e42c9 /include/uapi/linux/perf_event.h
parent47f661eca0700928012e11c57ea0328f5ccfc3b9 (diff)
downloadlinux-2b26f0aa004995f49f7b6f4100dd0e4c39a9ed5f.tar.xz
perf: Support only inheriting events if cloned with CLONE_THREAD
Adds bit perf_event_attr::inherit_thread, to restricting inheriting events only if the child was cloned with CLONE_THREAD. This option supports the case where an event is supposed to be process-wide only (including subthreads), but should not propagate beyond the current process's shared environment. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/lkml/YBvj6eJR%2FDY2TsEB@hirez.programming.kicks-ass.net/
Diffstat (limited to 'include/uapi/linux/perf_event.h')
-rw-r--r--include/uapi/linux/perf_event.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index ad15e40d7f5d..813efb65fea8 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -389,7 +389,8 @@ struct perf_event_attr {
cgroup : 1, /* include cgroup events */
text_poke : 1, /* include text poke events */
build_id : 1, /* use build id in mmap2 events */
- __reserved_1 : 29;
+ inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */
+ __reserved_1 : 28;
union {
__u32 wakeup_events; /* wakeup every n events */