summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2022-10-09 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2022-10-09 08:00:00 +0000
commit8de29abb7727674f1520833e02c5cbe3b3297bbd (patch)
tree175ae961ac61f7ce5e709e2a236b128088fe6a4a
parent4c171bced8ddec0a091391d82adb826399ce1a1c (diff)
downloadstrace-8de29abb7727674f1520833e02c5cbe3b3297bbd.tar.gz
xlat: update PERF_* constants
* src/xlat/perf_event_read_format.in (PERF_FORMAT_LOST): New constant introduced by Linux kernel commit v6.0-rc1~199^2~3. * tests/ioctl_perf.c (main): Update expected output. * tests/perf_event_open.c (read_formats): Likewise. * NEWS: Mention this change.
-rw-r--r--NEWS2
-rw-r--r--src/xlat/perf_event_read_format.in1
-rw-r--r--tests/ioctl_perf.c3
-rw-r--r--tests/perf_event_open.c11
4 files changed, 11 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index f2a4086cd..fd2cb6c1e 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ Noteworthy changes in release ?.?? (????-??-??)
* Enhanced decoding of PTP_* ioctl commands.
* Updated decoding of setns syscall.
* Updated lists of BPF_*, BTRFS_*, FAN_*, ETH_P_*, KVM_*, NDTPA_*,
- and NT_* constants.
+ NT_*, and PERF_* constants.
* Bug fixes
diff --git a/src/xlat/perf_event_read_format.in b/src/xlat/perf_event_read_format.in
index a270700fa..fb511a12b 100644
--- a/src/xlat/perf_event_read_format.in
+++ b/src/xlat/perf_event_read_format.in
@@ -2,3 +2,4 @@ PERF_FORMAT_TOTAL_TIME_ENABLED 1 << 0
PERF_FORMAT_TOTAL_TIME_RUNNING 1 << 1
PERF_FORMAT_ID 1 << 2
PERF_FORMAT_GROUP 1 << 3
+PERF_FORMAT_LOST 1 << 4
diff --git a/tests/ioctl_perf.c b/tests/ioctl_perf.c
index bf150a32a..d19978ac5 100644
--- a/tests/ioctl_perf.c
+++ b/tests/ioctl_perf.c
@@ -198,7 +198,8 @@ main(void)
"PERF_SAMPLE_TRANSACTION|PERF_SAMPLE_REGS_INTR|"
"PERF_SAMPLE_DATA_PAGE_SIZE|PERF_SAMPLE_CODE_PAGE_SIZE|"
"0xc2c3c4c5c6000000"
- ", read_format=PERF_FORMAT_TOTAL_TIME_ENABLED|0xcacbcccdcecfd0d0"
+ ", read_format=PERF_FORMAT_TOTAL_TIME_ENABLED|PERF_FORMAT_LOST|"
+ "0xcacbcccdcecfd0c0"
", disabled=1, inherit=1, exclusive=1, exclude_hv=1, mmap=1"
", comm=1, inherit_stat=1, watermark=1"
", precise_ip=3 /* must have 0 skid */, mmap_data=1"
diff --git a/tests/perf_event_open.c b/tests/perf_event_open.c
index 742247863..d01b23e11 100644
--- a/tests/perf_event_open.c
+++ b/tests/perf_event_open.c
@@ -532,15 +532,18 @@ main(void)
static const struct u64_val_str read_formats[] = {
{ ARG_STR(0) },
{ ARG_STR(PERF_FORMAT_TOTAL_TIME_ENABLED) },
- { 0xf, "PERF_FORMAT_TOTAL_TIME_ENABLED|"
+ { 0x1f, "PERF_FORMAT_TOTAL_TIME_ENABLED|"
"PERF_FORMAT_TOTAL_TIME_RUNNING|"
- "PERF_FORMAT_ID|PERF_FORMAT_GROUP" },
- { ARG_ULL_STR(0xdeadf157dec0ded0) " /* PERF_FORMAT_??? */" },
+ "PERF_FORMAT_ID|"
+ "PERF_FORMAT_GROUP|"
+ "PERF_FORMAT_LOST" },
+ { ARG_ULL_STR(0xdeadf157dec0dee0) " /* PERF_FORMAT_??? */" },
{ 0xffffffffffffffffULL,
"PERF_FORMAT_TOTAL_TIME_ENABLED|"
"PERF_FORMAT_TOTAL_TIME_RUNNING|"
"PERF_FORMAT_ID|PERF_FORMAT_GROUP|"
- "0xfffffffffffffff0" },
+ "PERF_FORMAT_LOST|"
+ "0xffffffffffffffe0" },
};
static const char *precise_ip_descs[] = {
"arbitrary skid",