summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2023-03-09 13:52:54 +0100
committerDmitry V. Levin <ldv@strace.io>2023-03-09 12:52:54 +0000
commite6caf76ddcbeeb405084e53866ef64c2554abf46 (patch)
tree95d982dc4a7e90f3605a56cf5c0d9ba36be256ca /src
parent7a337f88ef97367cc181a1d897381f22890b61a4 (diff)
downloadstrace-e6caf76ddcbeeb405084e53866ef64c2554abf46.tar.gz
Add config3 field to struct perf_event_attr
Linux kernel commit 09519ec3b19 ("perf: Add perf_event_attr::config3") aka v6.3-rc1~29^2~13 added a new config3 field to struct perf_event_attr. Add this field and implement its decoding in strace, which also fixes compilation of tests because of an array out-of-bounds warning in tests/perf_event.c. Signed-off-by: Sven Schnelle <svens@linux.ibm.com> * bundled/linux/include/uapi/linux/perf_event.h: Update to headers_install'ed Linux kernel v6.3-rc1. * src/perf_event_struct.h (struct perf_event_attr): Add config3 field. * src/perf.c (print_perf_event_attr): Print config3 field. * tests/perf_event_open.c (print_event_attr): Check it.
Diffstat (limited to 'src')
-rw-r--r--src/perf.c4
-rw-r--r--src/perf_event_struct.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/perf.c b/src/perf.c
index 76c4fab08..78681ecee 100644
--- a/src/perf.c
+++ b/src/perf.c
@@ -434,6 +434,10 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
tprint_struct_next();
PRINT_FIELD_X(*attr, sig_data);
+ STRACE_PERF_CHECK_FIELD(config3);
+ tprint_struct_next();
+ PRINT_FIELD_X(*attr, config3);
+
print_perf_event_attr_out:
if ((attr->size && (attr->size > size)) ||
(!attr->size && (size < PERF_ATTR_SIZE_VER0))) {
diff --git a/src/perf_event_struct.h b/src/perf_event_struct.h
index d9020f6e9..21113b376 100644
--- a/src/perf_event_struct.h
+++ b/src/perf_event_struct.h
@@ -94,6 +94,8 @@ struct perf_event_attr {
/* End of ver 6 - 120 bytes */
uint64_t sig_data;
/* End of ver 7 - 128 bytes */
+ uint64_t config3;
+ /* End of ver 8 - 136 bytes */
};
struct perf_event_query_bpf {