diff options
author | Marco Elver <elver@google.com> | 2021-04-08 13:35:59 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-04-16 17:32:41 +0300 |
commit | 2e498d0a74e5b88a6689ae1b811f247f91ff188e (patch) | |
tree | 3a236bd74d671a0ba46923d5bacc9cbf7b46a12d /include/uapi | |
parent | 2b26f0aa004995f49f7b6f4100dd0e4c39a9ed5f (diff) | |
download | linux-2e498d0a74e5b88a6689ae1b811f247f91ff188e.tar.xz |
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.h | 3 |
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 */ |