aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2021-04-08 12:35:59 +0200
committerPeter Zijlstra <peterz@infradead.org>2021-04-16 16:32:41 +0200
commit2e498d0a74e5b88a6689ae1b811f247f91ff188e (patch)
tree3a236bd74d671a0ba46923d5bacc9cbf7b46a12d /include/uapi
parentperf: Support only inheriting events if cloned with CLONE_THREAD (diff)
downloadlinux-dev-2e498d0a74e5b88a6689ae1b811f247f91ff188e.tar.xz
linux-dev-2e498d0a74e5b88a6689ae1b811f247f91ff188e.zip
perf: Add support for event removal on exec
Adds bit perf_event_attr::remove_on_exec, to support removing an event from a task on exec. This option supports the case where an event is supposed to be process-wide only, and should not propagate beyond exec, to limit monitoring to the original process image only. 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://lkml.kernel.org/r/20210408103605.1676875-5-elver@google.com
Diffstat (limited to 'include/uapi')
-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 813efb65fea8..8c5b9f5ad63f 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -390,7 +390,8 @@ struct perf_event_attr {
text_poke : 1, /* include text poke events */
build_id : 1, /* use build id in mmap2 events */
inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */
- __reserved_1 : 28;
+ remove_on_exec : 1, /* event is removed from task on exec */
+ __reserved_1 : 27;
union {
__u32 wakeup_events; /* wakeup every n events */