summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bundled/linux/include/uapi/linux/perf_event.h3
-rw-r--r--src/perf.c4
-rw-r--r--src/perf_event_struct.h3
-rw-r--r--tests/perf_event_open.c8
4 files changed, 13 insertions, 5 deletions
diff --git a/bundled/linux/include/uapi/linux/perf_event.h b/bundled/linux/include/uapi/linux/perf_event.h
index ec407df63..b6f0c16dc 100644
--- a/bundled/linux/include/uapi/linux/perf_event.h
+++ b/bundled/linux/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 */
diff --git a/src/perf.c b/src/perf.c
index acdd9b418..dd83835c1 100644
--- a/src/perf.c
+++ b/src/perf.c
@@ -317,6 +317,8 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
PRINT_FIELD_U_CAST(*attr, build_id, unsigned int);
tprint_struct_next();
PRINT_FIELD_U_CAST(*attr, inherit_thread, unsigned int);
+ tprint_struct_next();
+ PRINT_FIELD_U_CAST(*attr, remove_on_exec, unsigned int);
/*
* Print it only in case it is non-zero, since it may contain flags we
@@ -325,7 +327,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
if (attr->__reserved_1) {
tprint_struct_next();
PRINT_FIELD_X_CAST(*attr, __reserved_1, uint64_t);
- tprints_comment("Bits 63..36");
+ tprints_comment("Bits 63..37");
}
if (attr->watermark) {
diff --git a/src/perf_event_struct.h b/src/perf_event_struct.h
index ca330580f..acbcaef44 100644
--- a/src/perf_event_struct.h
+++ b/src/perf_event_struct.h
@@ -56,7 +56,8 @@ struct perf_event_attr {
text_poke :1,
build_id :1,
inherit_thread :1,
- __reserved_1 :28;
+ remove_on_exec :1,
+ __reserved_1 :27;
union {
uint32_t wakeup_events;
uint32_t wakeup_watermark;
diff --git a/tests/perf_event_open.c b/tests/perf_event_open.c
index 0b4c46ffa..6ee203050 100644
--- a/tests/perf_event_open.c
+++ b/tests/perf_event_open.c
@@ -83,7 +83,8 @@ struct pea_flags {
text_poke :1,
build_id :1,
inherit_thread :1,
- __reserved_1 :28;
+ remove_on_exec :1,
+ __reserved_1 :27;
};
static const char *
@@ -296,9 +297,12 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
val = attr->inherit_thread;
printf(", inherit_thread=%" PRIu64, val);
+ val = attr->remove_on_exec;
+ printf(", remove_on_exec=%" PRIu64, val);
+
val = flags_data.flags.__reserved_1;
if (val)
- printf(", __reserved_1=%#" PRIx64 " /* Bits 63..36 */", val);
+ printf(", __reserved_1=%#" PRIx64 " /* Bits 63..37 */", val);
printf(", %s=%u",
attr->watermark ? "wakeup_watermark" : "wakeup_events",