Skip to content

Commit 29995d2

Browse files
author
Ingo Molnar
committed
Merge tag 'perf-urgent-for-mingo-4.20-20181031' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent improvements and fixes from Arnaldo Carvalho de Melo: - Fixes dealing with the removal of the fallback to looking up samples marked as userspace in the kernel maps, done recently: - For intel-pt, that was setting the synthesized header misc field as PERF_RECORD_MISC_USER, depending thus on the fallback to take place, now it sets as USER or KERNEL according to x86 specific knowledge. Also now it inserts the PERF_CONTEXT_{USER,KERNEL} into the PERF_SAMPLE_CALLCHAINs it synthesizes from hw traces (Adrian Hunter) - Similar fixes for the cs-etm ARM HW trace code, that used the Intel PT model as a starting point (Leo Yan) - For the "caller" callchain order, where the callchain returned by the kernel was simply reversed without taking into account the PERF_CONTEXT_{USER,KERNEL,etc} markers from where to define if an entry was for kernel or userspace, working just because the map lookup fallback was in place (David S. Miller) - Allow for selecting if 'overwrite' mode should be used in 'perf top' and make the default for it not to be used. This is due to problems with the current implementation where the pausing used ends up making 'perf top' miss PERF_RECORD_{MMAP,FORK,EXEC,etc} events, which with short lifetime threads workloads leads quickly to many "unknown" maps (and thus symbols) to appear in the UI. Workloads with long thread lifetimes and with few metadata events can still use --overwrite to take advantage of the overwrite mode (Arnaldo Carvalho de Melo) - Start 'perf top''s display thread earlier, so that the screen doesn't remain blank for too long at tool start (David S. Miller) - Don't clone maps from parent when synthesizing forks, to avoid the inevitable flurry of overlapping maps as we process the synthesized MMAP2 events that get delivered shortly thereafter. (David S. Miller) - Take pgoff into account when reporting elf to libdwfl, now the unwinding results are the same with elfutils's libdwfl and libunwind (Milian Wolff) - Update lotsa kernel ABI headers (Arnaldo Carvalho de Melo) - 'perf trace' syscall arg beautification improvements to allow for handling args such as mount's 'flags', where maks have to be ignored before considering what is left, that, if only zeroes, is suppressed like other args without such masks (Arnaldo Carvalho de Melo) - Beautify mount's 'source' and 'flags' args (Arnaldo Carvalho de Melo) - Generate mmap's flags bit constants from linux/mman.h and all the arch specific mman.h files, so that no changes in the main 'perf trace' source files is required when new flags get added (Arnaldo Carvalho de Melo) - Consider syscall aliases, so that 'perf trace -e umount' works and we don't have to use 'umount2' (that works as well, just not required) (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
2 parents 28fa741 + 5d4f0ed commit 29995d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+837
-142
lines changed

include/uapi/linux/perf_event.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,12 @@ struct perf_event_mmap_page {
646646
*
647647
* PERF_RECORD_MISC_MMAP_DATA - PERF_RECORD_MMAP* events
648648
* PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event
649+
* PERF_RECORD_MISC_FORK_EXEC - PERF_RECORD_FORK event (perf internal)
649650
* PERF_RECORD_MISC_SWITCH_OUT - PERF_RECORD_SWITCH* events
650651
*/
651652
#define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
652653
#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
654+
#define PERF_RECORD_MISC_FORK_EXEC (1 << 13)
653655
#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)
654656
/*
655657
* These PERF_RECORD_MISC_* flags below are safely reused

tools/arch/arm64/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
*/
1717

1818
#define __ARCH_WANT_RENAMEAT
19+
#define __ARCH_WANT_NEW_STAT
1920

2021
#include <asm-generic/unistd.h>

tools/arch/powerpc/include/uapi/asm/kvm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ struct kvm_ppc_cpu_char {
634634

635635
#define KVM_REG_PPC_DEC_EXPIRY (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xbe)
636636
#define KVM_REG_PPC_ONLINE (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xbf)
637+
#define KVM_REG_PPC_PTCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc0)
637638

638639
/* Transactional Memory checkpointed state:
639640
* This is all GPRs, all VSX regs and a subset of SPRs

tools/arch/s390/include/uapi/asm/kvm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ struct kvm_s390_vm_cpu_subfunc {
160160
#define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW 1
161161
#define KVM_S390_VM_CRYPTO_DISABLE_AES_KW 2
162162
#define KVM_S390_VM_CRYPTO_DISABLE_DEA_KW 3
163+
#define KVM_S390_VM_CRYPTO_ENABLE_APIE 4
164+
#define KVM_S390_VM_CRYPTO_DISABLE_APIE 5
163165

164166
/* kvm attributes for migration mode */
165167
#define KVM_S390_VM_MIGRATION_STOP 0

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,7 @@ struct kvm_vcpu_events {
300300
__u8 injected;
301301
__u8 nr;
302302
__u8 has_error_code;
303-
union {
304-
__u8 pad;
305-
__u8 pending;
306-
};
303+
__u8 pending;
307304
__u32 error_code;
308305
} exception;
309306
struct {
@@ -387,6 +384,7 @@ struct kvm_sync_regs {
387384

388385
#define KVM_STATE_NESTED_GUEST_MODE 0x00000001
389386
#define KVM_STATE_NESTED_RUN_PENDING 0x00000002
387+
#define KVM_STATE_NESTED_EVMCS 0x00000004
390388

391389
#define KVM_STATE_NESTED_SMM_GUEST_MODE 0x00000001
392390
#define KVM_STATE_NESTED_SMM_VMXON 0x00000002

tools/include/uapi/asm-generic/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,12 @@ __SYSCALL(__NR_tee, sys_tee)
242242
/* fs/stat.c */
243243
#define __NR_readlinkat 78
244244
__SYSCALL(__NR_readlinkat, sys_readlinkat)
245+
#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
245246
#define __NR3264_fstatat 79
246247
__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
247248
#define __NR3264_fstat 80
248249
__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
250+
#endif
249251

250252
/* fs/sync.c */
251253
#define __NR_sync 81

0 commit comments

Comments
 (0)