Skip to content

Commit d1ac1a2

Browse files
committed
Merge tag 'perf-tools-for-v6.2-2-2022-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull more perf tools updates from Arnaldo Carvalho de Melo: "perf tools fixes and improvements: - Don't stop building perf if python setuptools isn't installed, just disable the affected perf feature. - Remove explicit reference to python 2.x devel files, that warning is about python-devel, no matter what version, being unavailable and thus disabling the linking with libpython. - Don't use -Werror=switch-enum when building the python support that handles libtraceevent enumerations, as there is no good way to test if some specific enum entry is available with the libtraceevent installed on the system. - Introduce 'perf lock contention' --type-filter and --lock-filter, to filter by lock type and lock name: $ sudo ./perf lock record -a -- ./perf bench sched messaging $ sudo ./perf lock contention -E 5 -Y spinlock contended total wait max wait avg wait type caller 802 1.26 ms 11.73 us 1.58 us spinlock __wake_up_common_lock+0x62 13 787.16 us 105.44 us 60.55 us spinlock remove_wait_queue+0x14 12 612.96 us 78.70 us 51.08 us spinlock prepare_to_wait+0x27 114 340.68 us 12.61 us 2.99 us spinlock try_to_wake_up+0x1f5 83 226.38 us 9.15 us 2.73 us spinlock folio_lruvec_lock_irqsave+0x5e $ sudo ./perf lock contention -l contended total wait max wait avg wait address symbol 57 1.11 ms 42.83 us 19.54 us ffff9f4140059000 15 280.88 us 23.51 us 18.73 us ffffffff9d007a40 jiffies_lock 1 20.49 us 20.49 us 20.49 us ffffffff9d0d50c0 rcu_state 1 9.02 us 9.02 us 9.02 us ffff9f41759e9ba0 $ sudo ./perf lock contention -L jiffies_lock,rcu_state contended total wait max wait avg wait type caller 15 280.88 us 23.51 us 18.73 us spinlock tick_sched_do_timer+0x93 1 20.49 us 20.49 us 20.49 us spinlock __softirqentry_text_start+0xeb $ sudo ./perf lock contention -L ffff9f4140059000 contended total wait max wait avg wait type caller 38 779.40 us 42.83 us 20.51 us spinlock worker_thread+0x50 11 216.30 us 39.87 us 19.66 us spinlock queue_work_on+0x39 8 118.13 us 20.51 us 14.77 us spinlock kthread+0xe5 - Fix splitting CC into compiler and options when checking if a option is present in clang to build the python binding, needed in systems such as yocto that set CC to, e.g.: "gcc --sysroot=/a/b/c". - Refresh metris and events for Intel systems: alderlake. alderlake-n, bonnell, broadwell, broadwellde, broadwellx, cascadelakex, elkhartlake, goldmont, goldmontplus, haswell, haswellx, icelake, icelakex, ivybridge, ivytown, jaketown, knightslanding, meteorlake, nehalemep, nehalemex, sandybridge, sapphirerapids, silvermont, skylake, skylakex, snowridgex, tigerlake, westmereep-dp, westmereep-sp, westmereex. - Add vendor events files (JSON) for AMD Zen 4, from sections 2.1.15.4 "Core Performance Monitor Counters", 2.1.15.5 "L3 Cache Performance Monitor Counter"s and Section 7.1 "Fabric Performance Monitor Counter (PMC) Events" in the Processor Programming Reference (PPR) for AMD Family 19h Model 11h Revision B1 processors. This constitutes events which capture op dispatch, execution and retirement, branch prediction, L1 and L2 cache activity, TLB activity, L3 cache activity and data bandwidth for various links and interfaces in the Data Fabric. - Also, from the same PPR are metrics taken from Section 2.1.15.2 "Performance Measurement", including pipeline utilization, which are new to Zen 4 processors and useful for finding performance bottlenecks by analyzing activity at different stages of the pipeline. - Greatly improve the 'srcline', 'srcline_from', 'srcline_to' and 'srcfile' sort keys performance by postponing calling the external addr2line utility to the collapse phase of histogram bucketing. - Fix 'perf test' "all PMU test" to skip parametrized events, that requires setting up and are not supported by this test. - Update tools/ copies of kernel headers: features, disabled-features, fscrypt.h, i915_drm.h, msr-index.h, power pc syscall table and kvm.h. - Add .DELETE_ON_ERROR special Makefile target to clean up partially updated files on error. - Simplify the mksyscalltbl script for arm64 by avoiding to run the host compiler to create the syscall table, do it all just with the shell script. - Further fixes to honour quiet mode (-q)" * tag 'perf-tools-for-v6.2-2-2022-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (67 commits) perf python: Fix splitting CC into compiler and options perf scripting python: Don't be strict at handling libtraceevent enumerations perf arm64: Simplify mksyscalltbl perf build: Remove explicit reference to python 2.x devel files perf vendor events amd: Add Zen 4 mapping perf vendor events amd: Add Zen 4 metrics perf vendor events amd: Add Zen 4 uncore events perf vendor events amd: Add Zen 4 core events perf vendor events intel: Refresh westmereex events perf vendor events intel: Refresh westmereep-sp events perf vendor events intel: Refresh westmereep-dp events perf vendor events intel: Refresh tigerlake metrics and events perf vendor events intel: Refresh snowridgex events perf vendor events intel: Refresh skylakex metrics and events perf vendor events intel: Refresh skylake metrics and events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh sapphirerapids metrics and events perf vendor events intel: Refresh sandybridge metrics and events perf vendor events intel: Refresh nehalemex events perf vendor events intel: Refresh nehalemep events ...
2 parents 9d2f606 + 09e6f9f commit d1ac1a2

File tree

318 files changed

+92040
-124719
lines changed

Some content is hidden

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

318 files changed

+92040
-124719
lines changed

tools/arch/x86/include/asm/cpufeatures.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,16 @@
304304
#define X86_FEATURE_UNRET (11*32+15) /* "" AMD BTB untrain return */
305305
#define X86_FEATURE_USE_IBPB_FW (11*32+16) /* "" Use IBPB during runtime firmware calls */
306306
#define X86_FEATURE_RSB_VMEXIT_LITE (11*32+17) /* "" Fill RSB on VM exit when EIBRS is enabled */
307+
#define X86_FEATURE_SGX_EDECCSSA (11*32+18) /* "" SGX EDECCSSA user leaf function */
308+
#define X86_FEATURE_CALL_DEPTH (11*32+19) /* "" Call depth tracking for RSB stuffing */
309+
#define X86_FEATURE_MSR_TSX_CTRL (11*32+20) /* "" MSR IA32_TSX_CTRL (Intel) implemented */
307310

308311
/* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
309312
#define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */
310313
#define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */
314+
#define X86_FEATURE_CMPCCXADD (12*32+ 7) /* "" CMPccXADD instructions */
315+
#define X86_FEATURE_AMX_FP16 (12*32+21) /* "" AMX fp16 Support */
316+
#define X86_FEATURE_AVX_IFMA (12*32+23) /* "" Support for VPMADD52[H,L]UQ */
311317

312318
/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
313319
#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */

tools/arch/x86/include/asm/disabled-features.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@
6969
# define DISABLE_UNRET (1 << (X86_FEATURE_UNRET & 31))
7070
#endif
7171

72+
#ifdef CONFIG_CALL_DEPTH_TRACKING
73+
# define DISABLE_CALL_DEPTH_TRACKING 0
74+
#else
75+
# define DISABLE_CALL_DEPTH_TRACKING (1 << (X86_FEATURE_CALL_DEPTH & 31))
76+
#endif
77+
7278
#ifdef CONFIG_INTEL_IOMMU_SVM
7379
# define DISABLE_ENQCMD 0
7480
#else
@@ -81,6 +87,12 @@
8187
# define DISABLE_SGX (1 << (X86_FEATURE_SGX & 31))
8288
#endif
8389

90+
#ifdef CONFIG_XEN_PV
91+
# define DISABLE_XENPV 0
92+
#else
93+
# define DISABLE_XENPV (1 << (X86_FEATURE_XENPV & 31))
94+
#endif
95+
8496
#ifdef CONFIG_INTEL_TDX_GUEST
8597
# define DISABLE_TDX_GUEST 0
8698
#else
@@ -98,10 +110,11 @@
98110
#define DISABLED_MASK5 0
99111
#define DISABLED_MASK6 0
100112
#define DISABLED_MASK7 (DISABLE_PTI)
101-
#define DISABLED_MASK8 (DISABLE_TDX_GUEST)
113+
#define DISABLED_MASK8 (DISABLE_XENPV|DISABLE_TDX_GUEST)
102114
#define DISABLED_MASK9 (DISABLE_SGX)
103115
#define DISABLED_MASK10 0
104-
#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET)
116+
#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \
117+
DISABLE_CALL_DEPTH_TRACKING)
105118
#define DISABLED_MASK12 0
106119
#define DISABLED_MASK13 0
107120
#define DISABLED_MASK14 0

tools/arch/x86/include/asm/msr-index.h

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44

55
#include <linux/bits.h>
66

7-
/*
8-
* CPU model specific register (MSR) numbers.
9-
*
10-
* Do not add new entries to this file unless the definitions are shared
11-
* between multiple compilation units.
12-
*/
7+
/* CPU model specific register (MSR) numbers. */
138

149
/* x86-64 specific MSRs */
1510
#define MSR_EFER 0xc0000080 /* extended feature register */
@@ -537,7 +532,7 @@
537532
#define MSR_AMD64_DC_CFG 0xc0011022
538533

539534
#define MSR_AMD64_DE_CFG 0xc0011029
540-
#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1
535+
#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1
541536
#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT)
542537

543538
#define MSR_AMD64_BU_CFG2 0xc001102a
@@ -798,6 +793,7 @@
798793
#define ENERGY_PERF_BIAS_PERFORMANCE 0
799794
#define ENERGY_PERF_BIAS_BALANCE_PERFORMANCE 4
800795
#define ENERGY_PERF_BIAS_NORMAL 6
796+
#define ENERGY_PERF_BIAS_NORMAL_POWERSAVE 7
801797
#define ENERGY_PERF_BIAS_BALANCE_POWERSAVE 8
802798
#define ENERGY_PERF_BIAS_POWERSAVE 15
803799

@@ -1052,6 +1048,20 @@
10521048
#define VMX_BASIC_MEM_TYPE_WB 6LLU
10531049
#define VMX_BASIC_INOUT 0x0040000000000000LLU
10541050

1051+
/* Resctrl MSRs: */
1052+
/* - Intel: */
1053+
#define MSR_IA32_L3_QOS_CFG 0xc81
1054+
#define MSR_IA32_L2_QOS_CFG 0xc82
1055+
#define MSR_IA32_QM_EVTSEL 0xc8d
1056+
#define MSR_IA32_QM_CTR 0xc8e
1057+
#define MSR_IA32_PQR_ASSOC 0xc8f
1058+
#define MSR_IA32_L3_CBM_BASE 0xc90
1059+
#define MSR_IA32_L2_CBM_BASE 0xd10
1060+
#define MSR_IA32_MBA_THRTL_BASE 0xd50
1061+
1062+
/* - AMD: */
1063+
#define MSR_IA32_MBA_BW_BASE 0xc0000200
1064+
10551065
/* MSR_IA32_VMX_MISC bits */
10561066
#define MSR_IA32_VMX_MISC_INTEL_PT (1ULL << 14)
10571067
#define MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS (1ULL << 29)

tools/include/uapi/drm/i915_drm.h

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,22 @@ typedef struct drm_i915_irq_wait {
645645
*/
646646
#define I915_SCHEDULER_CAP_STATIC_PRIORITY_MAP (1ul << 5)
647647

648+
/*
649+
* Query the status of HuC load.
650+
*
651+
* The query can fail in the following scenarios with the listed error codes:
652+
* -ENODEV if HuC is not present on this platform,
653+
* -EOPNOTSUPP if HuC firmware usage is disabled,
654+
* -ENOPKG if HuC firmware fetch failed,
655+
* -ENOEXEC if HuC firmware is invalid or mismatched,
656+
* -ENOMEM if i915 failed to prepare the FW objects for transfer to the uC,
657+
* -EIO if the FW transfer or the FW authentication failed.
658+
*
659+
* If the IOCTL is successful, the returned parameter will be set to one of the
660+
* following values:
661+
* * 0 if HuC firmware load is not complete,
662+
* * 1 if HuC firmware is authenticated and running.
663+
*/
648664
#define I915_PARAM_HUC_STATUS 42
649665

650666
/* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to opt-out of
@@ -749,6 +765,12 @@ typedef struct drm_i915_irq_wait {
749765
/* Query if the kernel supports the I915_USERPTR_PROBE flag. */
750766
#define I915_PARAM_HAS_USERPTR_PROBE 56
751767

768+
/*
769+
* Frequency of the timestamps in OA reports. This used to be the same as the CS
770+
* timestamp frequency, but differs on some platforms.
771+
*/
772+
#define I915_PARAM_OA_TIMESTAMP_FREQUENCY 57
773+
752774
/* Must be kept compact -- no holes and well documented */
753775

754776
/**
@@ -2650,6 +2672,10 @@ enum drm_i915_oa_format {
26502672
I915_OA_FORMAT_A12_B8_C8,
26512673
I915_OA_FORMAT_A32u40_A4u32_B8_C8,
26522674

2675+
/* DG2 */
2676+
I915_OAR_FORMAT_A32u40_A4u32_B8_C8,
2677+
I915_OA_FORMAT_A24u40_A14u32_B8_C8,
2678+
26532679
I915_OA_FORMAT_MAX /* non-ABI */
26542680
};
26552681

@@ -3493,27 +3519,13 @@ struct drm_i915_gem_create_ext {
34933519
*
34943520
* The (page-aligned) allocated size for the object will be returned.
34953521
*
3496-
* DG2 64K min page size implications:
3497-
*
3498-
* On discrete platforms, starting from DG2, we have to contend with GTT
3499-
* page size restrictions when dealing with I915_MEMORY_CLASS_DEVICE
3500-
* objects. Specifically the hardware only supports 64K or larger GTT
3501-
* page sizes for such memory. The kernel will already ensure that all
3502-
* I915_MEMORY_CLASS_DEVICE memory is allocated using 64K or larger page
3503-
* sizes underneath.
3504-
*
3505-
* Note that the returned size here will always reflect any required
3506-
* rounding up done by the kernel, i.e 4K will now become 64K on devices
3507-
* such as DG2. The kernel will always select the largest minimum
3508-
* page-size for the set of possible placements as the value to use when
3509-
* rounding up the @size.
3510-
*
3511-
* Special DG2 GTT address alignment requirement:
3512-
*
3513-
* The GTT alignment will also need to be at least 2M for such objects.
3522+
* On platforms like DG2/ATS the kernel will always use 64K or larger
3523+
* pages for I915_MEMORY_CLASS_DEVICE. The kernel also requires a
3524+
* minimum of 64K GTT alignment for such objects.
35143525
*
3515-
* Note that due to how the hardware implements 64K GTT page support, we
3516-
* have some further complications:
3526+
* NOTE: Previously the ABI here required a minimum GTT alignment of 2M
3527+
* on DG2/ATS, due to how the hardware implemented 64K GTT page support,
3528+
* where we had the following complications:
35173529
*
35183530
* 1) The entire PDE (which covers a 2MB virtual address range), must
35193531
* contain only 64K PTEs, i.e mixing 4K and 64K PTEs in the same
@@ -3522,12 +3534,10 @@ struct drm_i915_gem_create_ext {
35223534
* 2) We still need to support 4K PTEs for I915_MEMORY_CLASS_SYSTEM
35233535
* objects.
35243536
*
3525-
* To keep things simple for userland, we mandate that any GTT mappings
3526-
* must be aligned to and rounded up to 2MB. The kernel will internally
3527-
* pad them out to the next 2MB boundary. As this only wastes virtual
3528-
* address space and avoids userland having to copy any needlessly
3529-
* complicated PDE sharing scheme (coloring) and only affects DG2, this
3530-
* is deemed to be a good compromise.
3537+
* However on actual production HW this was completely changed to now
3538+
* allow setting a TLB hint at the PTE level (see PS64), which is a lot
3539+
* more flexible than the above. With this the 2M restriction was
3540+
* dropped where we now only require 64K.
35313541
*/
35323542
__u64 size;
35333543

tools/include/uapi/linux/fscrypt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#define FSCRYPT_MODE_AES_256_CTS 4
2727
#define FSCRYPT_MODE_AES_128_CBC 5
2828
#define FSCRYPT_MODE_AES_128_CTS 6
29+
#define FSCRYPT_MODE_SM4_XTS 7
30+
#define FSCRYPT_MODE_SM4_CTS 8
2931
#define FSCRYPT_MODE_ADIANTUM 9
3032
#define FSCRYPT_MODE_AES_256_HCTR2 10
3133
/* If adding a mode number > 10, update FSCRYPT_MODE_MAX in fscrypt_private.h */
@@ -185,8 +187,6 @@ struct fscrypt_get_key_status_arg {
185187
#define FS_ENCRYPTION_MODE_AES_256_CTS FSCRYPT_MODE_AES_256_CTS
186188
#define FS_ENCRYPTION_MODE_AES_128_CBC FSCRYPT_MODE_AES_128_CBC
187189
#define FS_ENCRYPTION_MODE_AES_128_CTS FSCRYPT_MODE_AES_128_CTS
188-
#define FS_ENCRYPTION_MODE_SPECK128_256_XTS 7 /* removed */
189-
#define FS_ENCRYPTION_MODE_SPECK128_256_CTS 8 /* removed */
190190
#define FS_ENCRYPTION_MODE_ADIANTUM FSCRYPT_MODE_ADIANTUM
191191
#define FS_KEY_DESC_PREFIX FSCRYPT_KEY_DESC_PREFIX
192192
#define FS_KEY_DESC_PREFIX_SIZE FSCRYPT_KEY_DESC_PREFIX_SIZE

tools/include/uapi/linux/kvm.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct kvm_userspace_memory_region {
9898
/*
9999
* The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for
100100
* userspace, other bits are reserved for kvm internal use which are defined
101-
*in include/linux/kvm_host.h.
101+
* in include/linux/kvm_host.h.
102102
*/
103103
#define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0)
104104
#define KVM_MEM_READONLY (1UL << 1)
@@ -477,6 +477,9 @@ struct kvm_run {
477477
#define KVM_MSR_EXIT_REASON_INVAL (1 << 0)
478478
#define KVM_MSR_EXIT_REASON_UNKNOWN (1 << 1)
479479
#define KVM_MSR_EXIT_REASON_FILTER (1 << 2)
480+
#define KVM_MSR_EXIT_REASON_VALID_MASK (KVM_MSR_EXIT_REASON_INVAL | \
481+
KVM_MSR_EXIT_REASON_UNKNOWN | \
482+
KVM_MSR_EXIT_REASON_FILTER)
480483
__u32 reason; /* kernel -> user */
481484
__u32 index; /* kernel -> user */
482485
__u64 data; /* kernel <-> user */
@@ -1170,6 +1173,8 @@ struct kvm_ppc_resize_hpt {
11701173
#define KVM_CAP_S390_ZPCI_OP 221
11711174
#define KVM_CAP_S390_CPU_TOPOLOGY 222
11721175
#define KVM_CAP_DIRTY_LOG_RING_ACQ_REL 223
1176+
#define KVM_CAP_S390_PROTECTED_ASYNC_DISABLE 224
1177+
#define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 225
11731178

11741179
#ifdef KVM_CAP_IRQ_ROUTING
11751180

@@ -1259,6 +1264,7 @@ struct kvm_x86_mce {
12591264
#define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 3)
12601265
#define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4)
12611266
#define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5)
1267+
#define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG (1 << 6)
12621268

12631269
struct kvm_xen_hvm_config {
12641270
__u32 flags;
@@ -1726,6 +1732,8 @@ enum pv_cmd_id {
17261732
KVM_PV_UNSHARE_ALL,
17271733
KVM_PV_INFO,
17281734
KVM_PV_DUMP,
1735+
KVM_PV_ASYNC_CLEANUP_PREPARE,
1736+
KVM_PV_ASYNC_CLEANUP_PERFORM,
17291737
};
17301738

17311739
struct kvm_pv_cmd {
@@ -1756,6 +1764,7 @@ struct kvm_xen_hvm_attr {
17561764
union {
17571765
__u8 long_mode;
17581766
__u8 vector;
1767+
__u8 runstate_update_flag;
17591768
struct {
17601769
__u64 gfn;
17611770
} shared_info;
@@ -1796,6 +1805,8 @@ struct kvm_xen_hvm_attr {
17961805
/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */
17971806
#define KVM_XEN_ATTR_TYPE_EVTCHN 0x3
17981807
#define KVM_XEN_ATTR_TYPE_XEN_VERSION 0x4
1808+
/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG */
1809+
#define KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG 0x5
17991810

18001811
/* Per-vCPU Xen attributes */
18011812
#define KVM_XEN_VCPU_GET_ATTR _IOWR(KVMIO, 0xca, struct kvm_xen_vcpu_attr)

tools/perf/Documentation/perf-lock.txt

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,25 +143,25 @@ CONTENTION OPTIONS
143143
System-wide collection from all CPUs.
144144

145145
-C::
146-
--cpu::
146+
--cpu=<value>::
147147
Collect samples only on the list of CPUs provided. Multiple CPUs can be
148148
provided as a comma-separated list with no space: 0,1. Ranges of CPUs
149149
are specified with -: 0-2. Default is to monitor all CPUs.
150150

151151
-p::
152-
--pid=::
152+
--pid=<value>::
153153
Record events on existing process ID (comma separated list).
154154

155-
--tid=::
155+
--tid=<value>::
156156
Record events on existing thread ID (comma separated list).
157157

158-
--map-nr-entries::
158+
--map-nr-entries=<value>::
159159
Maximum number of BPF map entries (default: 10240).
160160

161-
--max-stack::
161+
--max-stack=<value>::
162162
Maximum stack depth when collecting lock contention (default: 8).
163163

164-
--stack-skip
164+
--stack-skip=<value>::
165165
Number of stack depth to skip when finding a lock caller (default: 3).
166166

167167
-E::
@@ -172,6 +172,21 @@ CONTENTION OPTIONS
172172
--lock-addr::
173173
Show lock contention stat by address
174174

175+
-Y::
176+
--type-filter=<value>::
177+
Show lock contention only for given lock types (comma separated list).
178+
Available values are:
179+
semaphore, spinlock, rwlock, rwlock:R, rwlock:W, rwsem, rwsem:R, rwsem:W,
180+
rtmutex, rwlock-rt, rwlock-rt:R, rwlock-rt:W, pcpu-sem, pcpu-sem:R, pcpu-sem:W,
181+
mutex
182+
183+
Note that RW-variant of locks have :R and :W suffix. Names without the
184+
suffix are shortcuts for the both variants. Ex) rwsem = rwsem:R + rwsem:W.
185+
186+
-L::
187+
--lock-filter=<value>::
188+
Show lock contention only for given lock addresses or names (comma separated list).
189+
175190

176191
SEE ALSO
177192
--------

tools/perf/Makefile.config

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,12 +886,17 @@ else
886886
else
887887

888888
ifneq ($(feature-libpython), 1)
889-
$(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev)
889+
$(call disable-python,No 'Python.h' was found: disables Python support - please install python-devel/python-dev)
890890
else
891891
LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
892892
EXTLIBS += $(PYTHON_EMBED_LIBADD)
893-
PYTHON_EXTENSION_SUFFIX := $(shell $(PYTHON) -c 'from importlib import machinery; print(machinery.EXTENSION_SUFFIXES[0])')
894-
LANG_BINDINGS += $(obj-perf)python/perf$(PYTHON_EXTENSION_SUFFIX)
893+
PYTHON_SETUPTOOLS_INSTALLED := $(shell $(PYTHON) -c 'import setuptools;' 2> /dev/null && echo "yes" || echo "no")
894+
ifeq ($(PYTHON_SETUPTOOLS_INSTALLED), yes)
895+
PYTHON_EXTENSION_SUFFIX := $(shell $(PYTHON) -c 'from importlib import machinery; print(machinery.EXTENSION_SUFFIXES[0])')
896+
LANG_BINDINGS += $(obj-perf)python/perf$(PYTHON_EXTENSION_SUFFIX)
897+
else
898+
msg := $(warning Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent);
899+
endif
895900
CFLAGS += -DHAVE_LIBPYTHON_SUPPORT
896901
$(call detected,CONFIG_LIBPYTHON)
897902
endif

tools/perf/Makefile.perf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,3 +1151,6 @@ FORCE:
11511151
.PHONY: archheaders
11521152

11531153
endif # force_fixdep
1154+
1155+
# Delete partially updated (corrupted) files on error
1156+
.DELETE_ON_ERROR:

0 commit comments

Comments
 (0)