Skip to content

Commit a050a6d

Browse files
committed
Merge tag 'perf-tools-fixes-for-v5.13-2021-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tool fixes from Arnaldo Carvalho de Melo: - Fix 'perf script' decoding of Intel PT traces for abort handling and sample instruction bytes. - Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit to Intel PT 'perf script' decoder. - Fixes for the python based Intel PT trace viewer GUI. - Sync UAPI copies (unwire quotactl_path, some comment fixes). - Fix handling of missing kernel software events, such as the recently added 'cgroup-switches', and add the trivial glue for it in the tooling side, since it was added in this merge window. - Add missing initialization of zstd_data in 'perf buildid-list', detected with valgrind's memcheck. - Remove needless event enable/disable when all events uses BPF. - Fix libpfm4 support (63) test error for nested event groups. * tag 'perf-tools-fixes-for-v5.13-2021-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf stat: Skip evlist__[enable|disable] when all events uses BPF perf script: Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit perf scripts python: exported-sql-viewer.py: Fix warning display perf scripts python: exported-sql-viewer.py: Fix Array TypeError perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report tools headers UAPI: Sync files changed by the quotactl_path unwiring tools headers UAPI: Sync linux/perf_event.h with the kernel sources tools headers UAPI: Sync linux/fs.h with the kernel sources perf parse-events: Check if the software events array slots are populated perf tools: Add 'cgroup-switches' software event perf intel-pt: Remove redundant setting of ptq->insn_len perf intel-pt: Fix sample instruction bytes perf intel-pt: Fix transaction abort handling perf test: Fix libpfm4 support (63) test error for nested event groups tools arch kvm: Sync kvm headers with the kernel sources perf buildid-list: Initialize zstd_data
2 parents 1434a31 + f8b61bd commit a050a6d

20 files changed

Lines changed: 71 additions & 30 deletions

File tree

‎tools/arch/x86/include/uapi/asm/kvm.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ struct kvm_vmx_nested_state_hdr {
437437
__u16 flags;
438438
} smm;
439439

440+
__u16 pad;
441+
440442
__u32 flags;
441443
__u64 preemption_timer_deadline;
442444
};

‎tools/include/uapi/linux/fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ struct fsxattr {
185185
#define BLKROTATIONAL _IO(0x12,126)
186186
#define BLKZEROOUT _IO(0x12,127)
187187
/*
188-
* A jump here: 130-131 are reserved for zoned block devices
188+
* A jump here: 130-136 are reserved for zoned block devices
189189
* (see uapi/linux/blkzoned.h)
190190
*/
191191

‎tools/include/uapi/linux/perf_event.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ struct perf_event_attr {
464464

465465
/*
466466
* User provided data if sigtrap=1, passed back to user via
467-
* siginfo_t::si_perf, e.g. to permit user to identify the event.
467+
* siginfo_t::si_perf_data, e.g. to permit user to identify the event.
468468
*/
469469
__u64 sig_data;
470470
};

‎tools/perf/Documentation/perf-intel-pt.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ displayed as follows:
108108

109109
perf script --itrace=ibxwpe -F+flags
110110

111-
The flags are "bcrosyiABEx" which stand for branch, call, return, conditional,
112-
system, asynchronous, interrupt, transaction abort, trace begin, trace end, and
113-
in transaction, respectively.
111+
The flags are "bcrosyiABExgh" which stand for branch, call, return, conditional,
112+
system, asynchronous, interrupt, transaction abort, trace begin, trace end,
113+
in transaction, VM-entry, and VM-exit respectively.
114114

115115
perf script also supports higher level ways to dump instruction traces:
116116

‎tools/perf/Documentation/perf-script.txt‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,15 @@ OPTIONS
183183
At this point usage is displayed, and perf-script exits.
184184

185185
The flags field is synthesized and may have a value when Instruction
186-
Trace decoding. The flags are "bcrosyiABEx" which stand for branch,
186+
Trace decoding. The flags are "bcrosyiABExgh" which stand for branch,
187187
call, return, conditional, system, asynchronous, interrupt,
188-
transaction abort, trace begin, trace end, and in transaction,
188+
transaction abort, trace begin, trace end, in transaction, VM-Entry, and VM-Exit
189189
respectively. Known combinations of flags are printed more nicely e.g.
190190
"call" for "bc", "return" for "br", "jcc" for "bo", "jmp" for "b",
191191
"int" for "bci", "iret" for "bri", "syscall" for "bcs", "sysret" for "brs",
192192
"async" for "by", "hw int" for "bcyi", "tx abrt" for "bA", "tr strt" for "bB",
193-
"tr end" for "bE". However the "x" flag will be display separately in those
193+
"tr end" for "bE", "vmentry" for "bcg", "vmexit" for "bch".
194+
However the "x" flag will be displayed separately in those
194195
cases e.g. "jcc (x)" for a condition branch within a transaction.
195196

196197
The callindent field is synthesized and may have a value when

‎tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
440 n64 process_madvise sys_process_madvise
358358
441 n64 epoll_pwait2 sys_epoll_pwait2
359359
442 n64 mount_setattr sys_mount_setattr
360-
443 n64 quotactl_path sys_quotactl_path
360+
# 443 reserved for quotactl_path
361361
444 n64 landlock_create_ruleset sys_landlock_create_ruleset
362362
445 n64 landlock_add_rule sys_landlock_add_rule
363363
446 n64 landlock_restrict_self sys_landlock_restrict_self

‎tools/perf/arch/powerpc/entry/syscalls/syscall.tbl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@
522522
440 common process_madvise sys_process_madvise
523523
441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2
524524
442 common mount_setattr sys_mount_setattr
525-
443 common quotactl_path sys_quotactl_path
525+
# 443 reserved for quotactl_path
526526
444 common landlock_create_ruleset sys_landlock_create_ruleset
527527
445 common landlock_add_rule sys_landlock_add_rule
528528
446 common landlock_restrict_self sys_landlock_restrict_self

‎tools/perf/arch/s390/entry/syscalls/syscall.tbl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
440 common process_madvise sys_process_madvise sys_process_madvise
446446
441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2
447447
442 common mount_setattr sys_mount_setattr sys_mount_setattr
448-
443 common quotactl_path sys_quotactl_path sys_quotactl_path
448+
# 443 reserved for quotactl_path
449449
444 common landlock_create_ruleset sys_landlock_create_ruleset sys_landlock_create_ruleset
450450
445 common landlock_add_rule sys_landlock_add_rule sys_landlock_add_rule
451451
446 common landlock_restrict_self sys_landlock_restrict_self sys_landlock_restrict_self

‎tools/perf/arch/x86/entry/syscalls/syscall_64.tbl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@
364364
440 common process_madvise sys_process_madvise
365365
441 common epoll_pwait2 sys_epoll_pwait2
366366
442 common mount_setattr sys_mount_setattr
367-
443 common quotactl_path sys_quotactl_path
367+
# 443 reserved for quotactl_path
368368
444 common landlock_create_ruleset sys_landlock_create_ruleset
369369
445 common landlock_add_rule sys_landlock_add_rule
370370
446 common landlock_restrict_self sys_landlock_restrict_self

‎tools/perf/builtin-buildid-list.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
8080
if (!perf_header__has_feat(&session->header, HEADER_BUILD_ID))
8181
with_hits = true;
8282

83+
if (zstd_init(&(session->zstd_data), 0) < 0)
84+
pr_warning("Decompression initialization failed. Reported data may be incomplete.\n");
85+
8386
/*
8487
* in pipe-mode, the only way to get the buildids is to parse
8588
* the record stream. Buildids are stored as RECORD_HEADER_BUILD_ID

0 commit comments

Comments
 (0)