summaryrefslogtreecommitdiff
path: root/tests/perf_event_open.c
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2021-06-29 02:21:43 +0200
committerDmitry V. Levin <ldv@strace.io>2021-06-30 09:52:37 +0000
commitd0f447976149e48382ab9e999ca4744b281c5a83 (patch)
treecfd931ed30ae7a4bd230844a8e4dc97f0045ae39 /tests/perf_event_open.c
parent3ce9f441ec259af2278a91c0df8b234d60c41a43 (diff)
downloadstrace-d0f447976149e48382ab9e999ca4744b281c5a83.tar.gz
perf: implement struct perf_event_attr.cgroup field decoding
Introduced in Linux commit v5.7-rc1~77^2^2~24. * src/perf_event_struct.h (struct perf_event_attr): Add cgroup field. * src/perf.c (print_perf_event_attr): Print it; correct __reserved_1 comment. * tests/perf_event_open.c (struct pea_flags): Add cgroup field. (print_event_attr): Print it, correct the __reserved_1 field comment.
Diffstat (limited to 'tests/perf_event_open.c')
-rw-r--r--tests/perf_event_open.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/perf_event_open.c b/tests/perf_event_open.c
index d7c083f42..77e5e967a 100644
--- a/tests/perf_event_open.c
+++ b/tests/perf_event_open.c
@@ -79,7 +79,8 @@ struct pea_flags {
ksymbol :1,
bpf_event :1,
aux_output :1,
- __reserved_1 :32;
+ cgroup :1,
+ __reserved_1 :31;
};
static const char *
@@ -280,9 +281,12 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
val = attr->aux_output;
printf(", aux_output=%" PRIu64, val);
+ val = attr->cgroup;
+ printf(", cgroup=%" PRIu64, val);
+
val = flags_data.flags.__reserved_1;
if (val)
- printf(", __reserved_1=%#" PRIx64 " /* Bits 63..32 */", val);
+ printf(", __reserved_1=%#" PRIx64 " /* Bits 63..33 */", val);
printf(", %s=%u",
attr->watermark ? "wakeup_watermark" : "wakeup_events",