Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branch 'acme/perf-tools' into perf-tools-next

To pick up fixes that were already merged upstream.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+354 -289
+21 -5
tools/arch/x86/include/asm/cpufeatures.h
··· 97 97 #define X86_FEATURE_SYSENTER32 ( 3*32+15) /* "" sysenter in IA32 userspace */ 98 98 #define X86_FEATURE_REP_GOOD ( 3*32+16) /* REP microcode works well */ 99 99 #define X86_FEATURE_AMD_LBR_V2 ( 3*32+17) /* AMD Last Branch Record Extension Version 2 */ 100 - #define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) /* "" LFENCE synchronizes RDTSC */ 100 + /* FREE, was #define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) "" LFENCE synchronizes RDTSC */ 101 101 #define X86_FEATURE_ACC_POWER ( 3*32+19) /* AMD Accumulated Power Mechanism */ 102 102 #define X86_FEATURE_NOPL ( 3*32+20) /* The NOPL (0F 1F) instructions */ 103 103 #define X86_FEATURE_ALWAYS ( 3*32+21) /* "" Always-present feature */ ··· 226 226 227 227 /* Virtualization flags: Linux defined, word 8 */ 228 228 #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */ 229 - #define X86_FEATURE_VNMI ( 8*32+ 1) /* Intel Virtual NMI */ 230 - #define X86_FEATURE_FLEXPRIORITY ( 8*32+ 2) /* Intel FlexPriority */ 231 - #define X86_FEATURE_EPT ( 8*32+ 3) /* Intel Extended Page Table */ 232 - #define X86_FEATURE_VPID ( 8*32+ 4) /* Intel Virtual Processor ID */ 229 + #define X86_FEATURE_FLEXPRIORITY ( 8*32+ 1) /* Intel FlexPriority */ 230 + #define X86_FEATURE_EPT ( 8*32+ 2) /* Intel Extended Page Table */ 231 + #define X86_FEATURE_VPID ( 8*32+ 3) /* Intel Virtual Processor ID */ 233 232 234 233 #define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer VMMCALL to VMCALL */ 235 234 #define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */ ··· 306 307 #define X86_FEATURE_SGX_EDECCSSA (11*32+18) /* "" SGX EDECCSSA user leaf function */ 307 308 #define X86_FEATURE_CALL_DEPTH (11*32+19) /* "" Call depth tracking for RSB stuffing */ 308 309 #define X86_FEATURE_MSR_TSX_CTRL (11*32+20) /* "" MSR IA32_TSX_CTRL (Intel) implemented */ 310 + #define X86_FEATURE_SMBA (11*32+21) /* "" Slow Memory Bandwidth Allocation */ 311 + #define X86_FEATURE_BMEC (11*32+22) /* "" Bandwidth Monitoring Event Configuration */ 309 312 310 313 /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */ 311 314 #define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */ 312 315 #define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */ 313 316 #define X86_FEATURE_CMPCCXADD (12*32+ 7) /* "" CMPccXADD instructions */ 317 + #define X86_FEATURE_ARCH_PERFMON_EXT (12*32+ 8) /* "" Intel Architectural PerfMon Extension */ 318 + #define X86_FEATURE_FZRM (12*32+10) /* "" Fast zero-length REP MOVSB */ 319 + #define X86_FEATURE_FSRS (12*32+11) /* "" Fast short REP STOSB */ 320 + #define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */ 314 321 #define X86_FEATURE_LKGS (12*32+18) /* "" Load "kernel" (userspace) GS */ 315 322 #define X86_FEATURE_AMX_FP16 (12*32+21) /* "" AMX fp16 Support */ 316 323 #define X86_FEATURE_AVX_IFMA (12*32+23) /* "" Support for VPMADD52[H,L]UQ */ 324 + #define X86_FEATURE_LAM (12*32+26) /* Linear Address Masking */ 317 325 318 326 /* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */ 319 327 #define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */ ··· 337 331 #define X86_FEATURE_VIRT_SSBD (13*32+25) /* Virtualized Speculative Store Bypass Disable */ 338 332 #define X86_FEATURE_AMD_SSB_NO (13*32+26) /* "" Speculative Store Bypass is fixed in hardware. */ 339 333 #define X86_FEATURE_CPPC (13*32+27) /* Collaborative Processor Performance Control */ 334 + #define X86_FEATURE_AMD_PSFD (13*32+28) /* "" Predictive Store Forwarding Disable */ 340 335 #define X86_FEATURE_BTC_NO (13*32+29) /* "" Not vulnerable to Branch Type Confusion */ 341 336 #define X86_FEATURE_BRS (13*32+31) /* Branch Sampling available */ 342 337 ··· 370 363 #define X86_FEATURE_VGIF (15*32+16) /* Virtual GIF */ 371 364 #define X86_FEATURE_X2AVIC (15*32+18) /* Virtual x2apic */ 372 365 #define X86_FEATURE_V_SPEC_CTRL (15*32+20) /* Virtual SPEC_CTRL */ 366 + #define X86_FEATURE_VNMI (15*32+25) /* Virtual NMI */ 373 367 #define X86_FEATURE_SVME_ADDR_CHK (15*32+28) /* "" SVME addr check */ 374 368 375 369 /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */ ··· 435 427 #define X86_FEATURE_V_TSC_AUX (19*32+ 9) /* "" Virtual TSC_AUX */ 436 428 #define X86_FEATURE_SME_COHERENT (19*32+10) /* "" AMD hardware-enforced cache coherency */ 437 429 430 + /* AMD-defined Extended Feature 2 EAX, CPUID level 0x80000021 (EAX), word 20 */ 431 + #define X86_FEATURE_NO_NESTED_DATA_BP (20*32+ 0) /* "" No Nested Data Breakpoints */ 432 + #define X86_FEATURE_LFENCE_RDTSC (20*32+ 2) /* "" LFENCE always serializing / synchronizes RDTSC */ 433 + #define X86_FEATURE_NULL_SEL_CLR_BASE (20*32+ 6) /* "" Null Selector Clears Base */ 434 + #define X86_FEATURE_AUTOIBRS (20*32+ 8) /* "" Automatic IBRS */ 435 + #define X86_FEATURE_NO_SMM_CTL_MSR (20*32+ 9) /* "" SMM_CTL MSR is not present */ 436 + 438 437 /* 439 438 * BUG word(s) 440 439 */ ··· 482 467 #define X86_BUG_MMIO_UNKNOWN X86_BUG(26) /* CPU is too old and its MMIO Stale Data status is unknown */ 483 468 #define X86_BUG_RETBLEED X86_BUG(27) /* CPU is affected by RETBleed */ 484 469 #define X86_BUG_EIBRS_PBRSB X86_BUG(28) /* EIBRS is vulnerable to Post Barrier RSB Predictions */ 470 + #define X86_BUG_SMT_RSB X86_BUG(29) /* CPU is vulnerable to Cross-Thread Return Address Predictions */ 485 471 486 472 #endif /* _ASM_X86_CPUFEATURES_H */
+7 -1
tools/arch/x86/include/asm/disabled-features.h
··· 75 75 # define DISABLE_CALL_DEPTH_TRACKING (1 << (X86_FEATURE_CALL_DEPTH & 31)) 76 76 #endif 77 77 78 + #ifdef CONFIG_ADDRESS_MASKING 79 + # define DISABLE_LAM 0 80 + #else 81 + # define DISABLE_LAM (1 << (X86_FEATURE_LAM & 31)) 82 + #endif 83 + 78 84 #ifdef CONFIG_INTEL_IOMMU_SVM 79 85 # define DISABLE_ENQCMD 0 80 86 #else ··· 121 115 #define DISABLED_MASK10 0 122 116 #define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ 123 117 DISABLE_CALL_DEPTH_TRACKING) 124 - #define DISABLED_MASK12 0 118 + #define DISABLED_MASK12 (DISABLE_LAM) 125 119 #define DISABLED_MASK13 0 126 120 #define DISABLED_MASK14 0 127 121 #define DISABLED_MASK15 0
+8
tools/arch/x86/include/uapi/asm/prctl.h
··· 16 16 #define ARCH_GET_XCOMP_GUEST_PERM 0x1024 17 17 #define ARCH_REQ_XCOMP_GUEST_PERM 0x1025 18 18 19 + #define ARCH_XCOMP_TILECFG 17 20 + #define ARCH_XCOMP_TILEDATA 18 21 + 19 22 #define ARCH_MAP_VDSO_X32 0x2001 20 23 #define ARCH_MAP_VDSO_32 0x2002 21 24 #define ARCH_MAP_VDSO_64 0x2003 25 + 26 + #define ARCH_GET_UNTAG_MASK 0x4001 27 + #define ARCH_ENABLE_TAGGED_ADDR 0x4002 28 + #define ARCH_GET_MAX_TAG_BITS 0x4003 29 + #define ARCH_FORCE_TAGGED_SVA 0x4004 22 30 23 31 #endif /* _ASM_X86_PRCTL_H */
+3
tools/arch/x86/include/uapi/asm/unistd_32.h
··· 2 2 #ifndef __NR_fork 3 3 #define __NR_fork 2 4 4 #endif 5 + #ifndef __NR_execve 6 + #define __NR_execve 11 7 + #endif 5 8 #ifndef __NR_getppid 6 9 #define __NR_getppid 64 7 10 #endif
+10 -24
tools/arch/x86/lib/memcpy_64.S
··· 10 10 .section .noinstr.text, "ax" 11 11 12 12 /* 13 - * We build a jump to memcpy_orig by default which gets NOPped out on 14 - * the majority of x86 CPUs which set REP_GOOD. In addition, CPUs which 15 - * have the enhanced REP MOVSB/STOSB feature (ERMS), change those NOPs 16 - * to a jmp to memcpy_erms which does the REP; MOVSB mem copy. 17 - */ 18 - 19 - /* 20 13 * memcpy - Copy a memory block. 21 14 * 22 15 * Input: ··· 19 26 * 20 27 * Output: 21 28 * rax original destination 29 + * 30 + * The FSRM alternative should be done inline (avoiding the call and 31 + * the disgusting return handling), but that would require some help 32 + * from the compiler for better calling conventions. 33 + * 34 + * The 'rep movsb' itself is small enough to replace the call, but the 35 + * two register moves blow up the code. And one of them is "needed" 36 + * only for the return value that is the same as the source input, 37 + * which the compiler could/should do much better anyway. 22 38 */ 23 39 SYM_TYPED_FUNC_START(__memcpy) 24 - ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \ 25 - "jmp memcpy_erms", X86_FEATURE_ERMS 40 + ALTERNATIVE "jmp memcpy_orig", "", X86_FEATURE_FSRM 26 41 27 42 movq %rdi, %rax 28 43 movq %rdx, %rcx 29 - shrq $3, %rcx 30 - andl $7, %edx 31 - rep movsq 32 - movl %edx, %ecx 33 44 rep movsb 34 45 RET 35 46 SYM_FUNC_END(__memcpy) ··· 41 44 42 45 SYM_FUNC_ALIAS(memcpy, __memcpy) 43 46 EXPORT_SYMBOL(memcpy) 44 - 45 - /* 46 - * memcpy_erms() - enhanced fast string memcpy. This is faster and 47 - * simpler than memcpy. Use memcpy_erms when possible. 48 - */ 49 - SYM_FUNC_START_LOCAL(memcpy_erms) 50 - movq %rdi, %rax 51 - movq %rdx, %rcx 52 - rep movsb 53 - RET 54 - SYM_FUNC_END(memcpy_erms) 55 47 56 48 SYM_FUNC_START_LOCAL(memcpy_orig) 57 49 movq %rdi, %rax
+11 -36
tools/arch/x86/lib/memset_64.S
··· 18 18 * rdx count (bytes) 19 19 * 20 20 * rax original destination 21 + * 22 + * The FSRS alternative should be done inline (avoiding the call and 23 + * the disgusting return handling), but that would require some help 24 + * from the compiler for better calling conventions. 25 + * 26 + * The 'rep stosb' itself is small enough to replace the call, but all 27 + * the register moves blow up the code. And two of them are "needed" 28 + * only for the return value that is the same as the source input, 29 + * which the compiler could/should do much better anyway. 21 30 */ 22 31 SYM_FUNC_START(__memset) 23 - /* 24 - * Some CPUs support enhanced REP MOVSB/STOSB feature. It is recommended 25 - * to use it when possible. If not available, use fast string instructions. 26 - * 27 - * Otherwise, use original memset function. 28 - */ 29 - ALTERNATIVE_2 "jmp memset_orig", "", X86_FEATURE_REP_GOOD, \ 30 - "jmp memset_erms", X86_FEATURE_ERMS 32 + ALTERNATIVE "jmp memset_orig", "", X86_FEATURE_FSRS 31 33 32 34 movq %rdi,%r9 35 + movb %sil,%al 33 36 movq %rdx,%rcx 34 - andl $7,%edx 35 - shrq $3,%rcx 36 - /* expand byte value */ 37 - movzbl %sil,%esi 38 - movabs $0x0101010101010101,%rax 39 - imulq %rsi,%rax 40 - rep stosq 41 - movl %edx,%ecx 42 37 rep stosb 43 38 movq %r9,%rax 44 39 RET ··· 42 47 43 48 SYM_FUNC_ALIAS(memset, __memset) 44 49 EXPORT_SYMBOL(memset) 45 - 46 - /* 47 - * ISO C memset - set a memory block to a byte value. This function uses 48 - * enhanced rep stosb to override the fast string function. 49 - * The code is simpler and shorter than the fast string function as well. 50 - * 51 - * rdi destination 52 - * rsi value (char) 53 - * rdx count (bytes) 54 - * 55 - * rax original destination 56 - */ 57 - SYM_FUNC_START_LOCAL(memset_erms) 58 - movq %rdi,%r9 59 - movb %sil,%al 60 - movq %rdx,%rcx 61 - rep stosb 62 - movq %r9,%rax 63 - RET 64 - SYM_FUNC_END(memset_erms) 65 50 66 51 SYM_FUNC_START_LOCAL(memset_orig) 67 52 movq %rdi,%r10
+1 -2
tools/include/asm/alternative.h
··· 4 4 5 5 /* Just disable it so we can build arch/x86/lib/memcpy_64.S for perf bench: */ 6 6 7 - #define altinstruction_entry # 8 - #define ALTERNATIVE_2 # 7 + #define ALTERNATIVE # 9 8 10 9 #endif
+2
tools/include/uapi/linux/prctl.h
··· 290 290 #define PR_SET_VMA 0x53564d41 291 291 # define PR_SET_VMA_ANON_NAME 0 292 292 293 + #define PR_GET_AUXV 0x41555856 294 + 293 295 #define PR_SET_MEMORY_MERGE 67 294 296 #define PR_GET_MEMORY_MERGE 68 295 297 #endif /* _LINUX_PRCTL_H */
+1 -1
tools/perf/arch/s390/entry/syscalls/syscall.tbl
··· 449 449 444 common landlock_create_ruleset sys_landlock_create_ruleset sys_landlock_create_ruleset 450 450 445 common landlock_add_rule sys_landlock_add_rule sys_landlock_add_rule 451 451 446 common landlock_restrict_self sys_landlock_restrict_self sys_landlock_restrict_self 452 - # 447 reserved for memfd_secret 452 + 447 common memfd_secret sys_memfd_secret sys_memfd_secret 453 453 448 common process_mrelease sys_process_mrelease sys_process_mrelease 454 454 449 common futex_waitv sys_futex_waitv sys_futex_waitv 455 455 450 common set_mempolicy_home_node sys_set_mempolicy_home_node sys_set_mempolicy_home_node
-4
tools/perf/bench/mem-memcpy-x86-64-asm-def.h
··· 7 7 MEMCPY_FN(__memcpy, 8 8 "x86-64-movsq", 9 9 "movsq-based memcpy() in arch/x86/lib/memcpy_64.S") 10 - 11 - MEMCPY_FN(memcpy_erms, 12 - "x86-64-movsb", 13 - "movsb-based memcpy() in arch/x86/lib/memcpy_64.S")
+1 -1
tools/perf/bench/mem-memcpy-x86-64-asm.S
··· 2 2 3 3 /* Various wrappers to make the kernel .S file build in user-space: */ 4 4 5 - // memcpy_orig and memcpy_erms are being defined as SYM_L_LOCAL but we need it 5 + // memcpy_orig is being defined as SYM_L_LOCAL but we need it 6 6 #define SYM_FUNC_START_LOCAL(name) \ 7 7 SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) 8 8 #define memcpy MEMCPY /* don't hide glibc's memcpy() */
-4
tools/perf/bench/mem-memset-x86-64-asm-def.h
··· 7 7 MEMSET_FN(__memset, 8 8 "x86-64-stosq", 9 9 "movsq-based memset() in arch/x86/lib/memset_64.S") 10 - 11 - MEMSET_FN(memset_erms, 12 - "x86-64-stosb", 13 - "movsb-based memset() in arch/x86/lib/memset_64.S")
+1 -1
tools/perf/bench/mem-memset-x86-64-asm.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - // memset_orig and memset_erms are being defined as SYM_L_LOCAL but we need it 2 + // memset_orig is being defined as SYM_L_LOCAL but we need it 3 3 #define SYM_FUNC_START_LOCAL(name) \ 4 4 SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) 5 5 #define memset MEMSET /* don't hide glibc's memset() */
+3 -3
tools/perf/tests/attr.py
··· 152 152 # - expected values assignments 153 153 class Test(object): 154 154 def __init__(self, path, options): 155 - parser = configparser.SafeConfigParser() 155 + parser = configparser.ConfigParser() 156 156 parser.read(path) 157 157 158 158 log.warning("running '%s'" % path) ··· 247 247 return True 248 248 249 249 def load_events(self, path, events): 250 - parser_event = configparser.SafeConfigParser() 250 + parser_event = configparser.ConfigParser() 251 251 parser_event.read(path) 252 252 253 253 # The event record section header contains 'event' word, ··· 261 261 # Read parent event if there's any 262 262 if (':' in section): 263 263 base = section[section.index(':') + 1:] 264 - parser_base = configparser.SafeConfigParser() 264 + parser_base = configparser.ConfigParser() 265 265 parser_base.read(self.test_dir + '/' + base) 266 266 base_items = parser_base.items('event') 267 267
+1 -1
tools/perf/tests/attr/base-stat
··· 16 16 exclusive=0 17 17 exclude_user=0 18 18 exclude_kernel=0|1 19 - exclude_hv=0 19 + exclude_hv=0|1 20 20 exclude_idle=0 21 21 mmap=0 22 22 comm=0
+57 -39
tools/perf/tests/attr/test-stat-default
··· 40 40 type=0 41 41 config=7 42 42 optional=1 43 - 44 43 # PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_BACKEND 45 44 [event7:base-stat] 46 45 fd=7 ··· 88 89 read_format=15 89 90 optional=1 90 91 91 - # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 92 + # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 92 93 [event13:base-stat] 93 94 fd=13 94 - group_fd=11 95 - type=4 96 - config=33024 97 - disabled=0 98 - enable_on_exec=0 99 - read_format=15 100 - optional=1 101 - 102 - # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 103 - [event14:base-stat] 104 - fd=14 105 95 group_fd=11 106 96 type=4 107 97 config=33280 ··· 100 112 optional=1 101 113 102 114 # PERF_TYPE_RAW / topdown-be-bound (0x8300) 103 - [event15:base-stat] 104 - fd=15 115 + [event14:base-stat] 116 + fd=14 105 117 group_fd=11 106 118 type=4 107 119 config=33536 ··· 110 122 read_format=15 111 123 optional=1 112 124 113 - # PERF_TYPE_RAW / topdown-heavy-ops (0x8400) 125 + # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 126 + [event15:base-stat] 127 + fd=15 128 + group_fd=11 129 + type=4 130 + config=33024 131 + disabled=0 132 + enable_on_exec=0 133 + read_format=15 134 + optional=1 135 + 136 + # PERF_TYPE_RAW / INT_MISC.UOP_DROPPING 114 137 [event16:base-stat] 115 138 fd=16 116 - group_fd=11 117 139 type=4 118 - config=33792 119 - disabled=0 120 - enable_on_exec=0 121 - read_format=15 140 + config=4109 122 141 optional=1 123 142 124 - # PERF_TYPE_RAW / topdown-br-mispredict (0x8500) 143 + # PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/ 125 144 [event17:base-stat] 126 145 fd=17 127 - group_fd=11 128 146 type=4 129 - config=34048 130 - disabled=0 131 - enable_on_exec=0 132 - read_format=15 147 + config=17039629 133 148 optional=1 134 149 135 - # PERF_TYPE_RAW / topdown-fetch-lat (0x8600) 150 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD 136 151 [event18:base-stat] 137 152 fd=18 138 - group_fd=11 139 153 type=4 140 - config=34304 141 - disabled=0 142 - enable_on_exec=0 143 - read_format=15 154 + config=60 144 155 optional=1 145 156 146 - # PERF_TYPE_RAW / topdown-mem-bound (0x8700) 157 + # PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY 147 158 [event19:base-stat] 148 159 fd=19 149 - group_fd=11 150 160 type=4 151 - config=34560 152 - disabled=0 153 - enable_on_exec=0 154 - read_format=15 161 + config=2097421 162 + optional=1 163 + 164 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK 165 + [event20:base-stat] 166 + fd=20 167 + type=4 168 + config=316 169 + optional=1 170 + 171 + # PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE 172 + [event21:base-stat] 173 + fd=21 174 + type=4 175 + config=412 176 + optional=1 177 + 178 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE 179 + [event22:base-stat] 180 + fd=22 181 + type=4 182 + config=572 183 + optional=1 184 + 185 + # PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS 186 + [event23:base-stat] 187 + fd=23 188 + type=4 189 + config=706 190 + optional=1 191 + 192 + # PERF_TYPE_RAW / UOPS_ISSUED.ANY 193 + [event24:base-stat] 194 + fd=24 195 + type=4 196 + config=270 155 197 optional=1
+65 -46
tools/perf/tests/attr/test-stat-detailed-1
··· 90 90 read_format=15 91 91 optional=1 92 92 93 - # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 93 + # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 94 94 [event13:base-stat] 95 95 fd=13 96 - group_fd=11 97 - type=4 98 - config=33024 99 - disabled=0 100 - enable_on_exec=0 101 - read_format=15 102 - optional=1 103 - 104 - # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 105 - [event14:base-stat] 106 - fd=14 107 96 group_fd=11 108 97 type=4 109 98 config=33280 ··· 102 113 optional=1 103 114 104 115 # PERF_TYPE_RAW / topdown-be-bound (0x8300) 105 - [event15:base-stat] 106 - fd=15 116 + [event14:base-stat] 117 + fd=14 107 118 group_fd=11 108 119 type=4 109 120 config=33536 ··· 112 123 read_format=15 113 124 optional=1 114 125 115 - # PERF_TYPE_RAW / topdown-heavy-ops (0x8400) 126 + # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 127 + [event15:base-stat] 128 + fd=15 129 + group_fd=11 130 + type=4 131 + config=33024 132 + disabled=0 133 + enable_on_exec=0 134 + read_format=15 135 + optional=1 136 + 137 + # PERF_TYPE_RAW / INT_MISC.UOP_DROPPING 116 138 [event16:base-stat] 117 139 fd=16 118 - group_fd=11 119 140 type=4 120 - config=33792 121 - disabled=0 122 - enable_on_exec=0 123 - read_format=15 141 + config=4109 124 142 optional=1 125 143 126 - # PERF_TYPE_RAW / topdown-br-mispredict (0x8500) 144 + # PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/ 127 145 [event17:base-stat] 128 146 fd=17 129 - group_fd=11 130 147 type=4 131 - config=34048 132 - disabled=0 133 - enable_on_exec=0 134 - read_format=15 148 + config=17039629 135 149 optional=1 136 150 137 - # PERF_TYPE_RAW / topdown-fetch-lat (0x8600) 151 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD 138 152 [event18:base-stat] 139 153 fd=18 140 - group_fd=11 141 154 type=4 142 - config=34304 143 - disabled=0 144 - enable_on_exec=0 145 - read_format=15 155 + config=60 146 156 optional=1 147 157 148 - # PERF_TYPE_RAW / topdown-mem-bound (0x8700) 158 + # PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY 149 159 [event19:base-stat] 150 160 fd=19 151 - group_fd=11 152 161 type=4 153 - config=34560 154 - disabled=0 155 - enable_on_exec=0 156 - read_format=15 162 + config=2097421 163 + optional=1 164 + 165 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK 166 + [event20:base-stat] 167 + fd=20 168 + type=4 169 + config=316 170 + optional=1 171 + 172 + # PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE 173 + [event21:base-stat] 174 + fd=21 175 + type=4 176 + config=412 177 + optional=1 178 + 179 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE 180 + [event22:base-stat] 181 + fd=22 182 + type=4 183 + config=572 184 + optional=1 185 + 186 + # PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS 187 + [event23:base-stat] 188 + fd=23 189 + type=4 190 + config=706 191 + optional=1 192 + 193 + # PERF_TYPE_RAW / UOPS_ISSUED.ANY 194 + [event24:base-stat] 195 + fd=24 196 + type=4 197 + config=270 157 198 optional=1 158 199 159 200 # PERF_TYPE_HW_CACHE / 160 201 # PERF_COUNT_HW_CACHE_L1D << 0 | 161 202 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 162 203 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 163 - [event20:base-stat] 164 - fd=20 204 + [event25:base-stat] 205 + fd=25 165 206 type=3 166 207 config=0 167 208 optional=1 ··· 200 181 # PERF_COUNT_HW_CACHE_L1D << 0 | 201 182 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 202 183 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 203 - [event21:base-stat] 204 - fd=21 184 + [event26:base-stat] 185 + fd=26 205 186 type=3 206 187 config=65536 207 188 optional=1 ··· 210 191 # PERF_COUNT_HW_CACHE_LL << 0 | 211 192 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 212 193 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 213 - [event22:base-stat] 214 - fd=22 194 + [event27:base-stat] 195 + fd=27 215 196 type=3 216 197 config=2 217 198 optional=1 ··· 220 201 # PERF_COUNT_HW_CACHE_LL << 0 | 221 202 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 222 203 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 223 - [event23:base-stat] 224 - fd=23 204 + [event28:base-stat] 205 + fd=28 225 206 type=3 226 207 config=65538 227 208 optional=1
+77 -58
tools/perf/tests/attr/test-stat-detailed-2
··· 90 90 read_format=15 91 91 optional=1 92 92 93 - # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 93 + # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 94 94 [event13:base-stat] 95 95 fd=13 96 - group_fd=11 97 - type=4 98 - config=33024 99 - disabled=0 100 - enable_on_exec=0 101 - read_format=15 102 - optional=1 103 - 104 - # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 105 - [event14:base-stat] 106 - fd=14 107 96 group_fd=11 108 97 type=4 109 98 config=33280 ··· 102 113 optional=1 103 114 104 115 # PERF_TYPE_RAW / topdown-be-bound (0x8300) 105 - [event15:base-stat] 106 - fd=15 116 + [event14:base-stat] 117 + fd=14 107 118 group_fd=11 108 119 type=4 109 120 config=33536 ··· 112 123 read_format=15 113 124 optional=1 114 125 115 - # PERF_TYPE_RAW / topdown-heavy-ops (0x8400) 126 + # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 127 + [event15:base-stat] 128 + fd=15 129 + group_fd=11 130 + type=4 131 + config=33024 132 + disabled=0 133 + enable_on_exec=0 134 + read_format=15 135 + optional=1 136 + 137 + # PERF_TYPE_RAW / INT_MISC.UOP_DROPPING 116 138 [event16:base-stat] 117 139 fd=16 118 - group_fd=11 119 140 type=4 120 - config=33792 121 - disabled=0 122 - enable_on_exec=0 123 - read_format=15 141 + config=4109 124 142 optional=1 125 143 126 - # PERF_TYPE_RAW / topdown-br-mispredict (0x8500) 144 + # PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/ 127 145 [event17:base-stat] 128 146 fd=17 129 - group_fd=11 130 147 type=4 131 - config=34048 132 - disabled=0 133 - enable_on_exec=0 134 - read_format=15 148 + config=17039629 135 149 optional=1 136 150 137 - # PERF_TYPE_RAW / topdown-fetch-lat (0x8600) 151 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD 138 152 [event18:base-stat] 139 153 fd=18 140 - group_fd=11 141 154 type=4 142 - config=34304 143 - disabled=0 144 - enable_on_exec=0 145 - read_format=15 155 + config=60 146 156 optional=1 147 157 148 - # PERF_TYPE_RAW / topdown-mem-bound (0x8700) 158 + # PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY 149 159 [event19:base-stat] 150 160 fd=19 151 - group_fd=11 152 161 type=4 153 - config=34560 154 - disabled=0 155 - enable_on_exec=0 156 - read_format=15 162 + config=2097421 163 + optional=1 164 + 165 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK 166 + [event20:base-stat] 167 + fd=20 168 + type=4 169 + config=316 170 + optional=1 171 + 172 + # PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE 173 + [event21:base-stat] 174 + fd=21 175 + type=4 176 + config=412 177 + optional=1 178 + 179 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE 180 + [event22:base-stat] 181 + fd=22 182 + type=4 183 + config=572 184 + optional=1 185 + 186 + # PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS 187 + [event23:base-stat] 188 + fd=23 189 + type=4 190 + config=706 191 + optional=1 192 + 193 + # PERF_TYPE_RAW / UOPS_ISSUED.ANY 194 + [event24:base-stat] 195 + fd=24 196 + type=4 197 + config=270 157 198 optional=1 158 199 159 200 # PERF_TYPE_HW_CACHE / 160 201 # PERF_COUNT_HW_CACHE_L1D << 0 | 161 202 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 162 203 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 163 - [event20:base-stat] 164 - fd=20 204 + [event25:base-stat] 205 + fd=25 165 206 type=3 166 207 config=0 167 208 optional=1 ··· 200 181 # PERF_COUNT_HW_CACHE_L1D << 0 | 201 182 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 202 183 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 203 - [event21:base-stat] 204 - fd=21 184 + [event26:base-stat] 185 + fd=26 205 186 type=3 206 187 config=65536 207 188 optional=1 ··· 210 191 # PERF_COUNT_HW_CACHE_LL << 0 | 211 192 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 212 193 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 213 - [event22:base-stat] 214 - fd=22 194 + [event27:base-stat] 195 + fd=27 215 196 type=3 216 197 config=2 217 198 optional=1 ··· 220 201 # PERF_COUNT_HW_CACHE_LL << 0 | 221 202 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 222 203 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 223 - [event23:base-stat] 224 - fd=23 204 + [event28:base-stat] 205 + fd=28 225 206 type=3 226 207 config=65538 227 208 optional=1 ··· 230 211 # PERF_COUNT_HW_CACHE_L1I << 0 | 231 212 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 232 213 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 233 - [event24:base-stat] 234 - fd=24 214 + [event29:base-stat] 215 + fd=29 235 216 type=3 236 217 config=1 237 218 optional=1 ··· 240 221 # PERF_COUNT_HW_CACHE_L1I << 0 | 241 222 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 242 223 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 243 - [event25:base-stat] 244 - fd=25 224 + [event30:base-stat] 225 + fd=30 245 226 type=3 246 227 config=65537 247 228 optional=1 ··· 250 231 # PERF_COUNT_HW_CACHE_DTLB << 0 | 251 232 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 252 233 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 253 - [event26:base-stat] 254 - fd=26 234 + [event31:base-stat] 235 + fd=31 255 236 type=3 256 237 config=3 257 238 optional=1 ··· 260 241 # PERF_COUNT_HW_CACHE_DTLB << 0 | 261 242 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 262 243 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 263 - [event27:base-stat] 264 - fd=27 244 + [event32:base-stat] 245 + fd=32 265 246 type=3 266 247 config=65539 267 248 optional=1 ··· 270 251 # PERF_COUNT_HW_CACHE_ITLB << 0 | 271 252 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 272 253 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 273 - [event28:base-stat] 274 - fd=28 254 + [event33:base-stat] 255 + fd=33 275 256 type=3 276 257 config=4 277 258 optional=1 ··· 280 261 # PERF_COUNT_HW_CACHE_ITLB << 0 | 281 262 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 282 263 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 283 - [event29:base-stat] 284 - fd=29 264 + [event34:base-stat] 265 + fd=34 285 266 type=3 286 267 config=65540 287 268 optional=1
+81 -62
tools/perf/tests/attr/test-stat-detailed-3
··· 90 90 read_format=15 91 91 optional=1 92 92 93 - # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 93 + # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 94 94 [event13:base-stat] 95 95 fd=13 96 - group_fd=11 97 - type=4 98 - config=33024 99 - disabled=0 100 - enable_on_exec=0 101 - read_format=15 102 - optional=1 103 - 104 - # PERF_TYPE_RAW / topdown-fe-bound (0x8200) 105 - [event14:base-stat] 106 - fd=14 107 96 group_fd=11 108 97 type=4 109 98 config=33280 ··· 102 113 optional=1 103 114 104 115 # PERF_TYPE_RAW / topdown-be-bound (0x8300) 105 - [event15:base-stat] 106 - fd=15 116 + [event14:base-stat] 117 + fd=14 107 118 group_fd=11 108 119 type=4 109 120 config=33536 ··· 112 123 read_format=15 113 124 optional=1 114 125 115 - # PERF_TYPE_RAW / topdown-heavy-ops (0x8400) 126 + # PERF_TYPE_RAW / topdown-bad-spec (0x8100) 127 + [event15:base-stat] 128 + fd=15 129 + group_fd=11 130 + type=4 131 + config=33024 132 + disabled=0 133 + enable_on_exec=0 134 + read_format=15 135 + optional=1 136 + 137 + # PERF_TYPE_RAW / INT_MISC.UOP_DROPPING 116 138 [event16:base-stat] 117 139 fd=16 118 - group_fd=11 119 140 type=4 120 - config=33792 121 - disabled=0 122 - enable_on_exec=0 123 - read_format=15 141 + config=4109 124 142 optional=1 125 143 126 - # PERF_TYPE_RAW / topdown-br-mispredict (0x8500) 144 + # PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/ 127 145 [event17:base-stat] 128 146 fd=17 129 - group_fd=11 130 147 type=4 131 - config=34048 132 - disabled=0 133 - enable_on_exec=0 134 - read_format=15 148 + config=17039629 135 149 optional=1 136 150 137 - # PERF_TYPE_RAW / topdown-fetch-lat (0x8600) 151 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD 138 152 [event18:base-stat] 139 153 fd=18 140 - group_fd=11 141 154 type=4 142 - config=34304 143 - disabled=0 144 - enable_on_exec=0 145 - read_format=15 155 + config=60 146 156 optional=1 147 157 148 - # PERF_TYPE_RAW / topdown-mem-bound (0x8700) 158 + # PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY 149 159 [event19:base-stat] 150 160 fd=19 151 - group_fd=11 152 161 type=4 153 - config=34560 154 - disabled=0 155 - enable_on_exec=0 156 - read_format=15 162 + config=2097421 163 + optional=1 164 + 165 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK 166 + [event20:base-stat] 167 + fd=20 168 + type=4 169 + config=316 170 + optional=1 171 + 172 + # PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE 173 + [event21:base-stat] 174 + fd=21 175 + type=4 176 + config=412 177 + optional=1 178 + 179 + # PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE 180 + [event22:base-stat] 181 + fd=22 182 + type=4 183 + config=572 184 + optional=1 185 + 186 + # PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS 187 + [event23:base-stat] 188 + fd=23 189 + type=4 190 + config=706 191 + optional=1 192 + 193 + # PERF_TYPE_RAW / UOPS_ISSUED.ANY 194 + [event24:base-stat] 195 + fd=24 196 + type=4 197 + config=270 157 198 optional=1 158 199 159 200 # PERF_TYPE_HW_CACHE / 160 201 # PERF_COUNT_HW_CACHE_L1D << 0 | 161 202 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 162 203 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 163 - [event20:base-stat] 164 - fd=20 204 + [event25:base-stat] 205 + fd=25 165 206 type=3 166 207 config=0 167 208 optional=1 ··· 200 181 # PERF_COUNT_HW_CACHE_L1D << 0 | 201 182 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 202 183 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 203 - [event21:base-stat] 204 - fd=21 184 + [event26:base-stat] 185 + fd=26 205 186 type=3 206 187 config=65536 207 188 optional=1 ··· 210 191 # PERF_COUNT_HW_CACHE_LL << 0 | 211 192 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 212 193 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 213 - [event22:base-stat] 214 - fd=22 194 + [event27:base-stat] 195 + fd=27 215 196 type=3 216 197 config=2 217 198 optional=1 ··· 220 201 # PERF_COUNT_HW_CACHE_LL << 0 | 221 202 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 222 203 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 223 - [event23:base-stat] 224 - fd=23 204 + [event28:base-stat] 205 + fd=28 225 206 type=3 226 207 config=65538 227 208 optional=1 ··· 230 211 # PERF_COUNT_HW_CACHE_L1I << 0 | 231 212 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 232 213 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 233 - [event24:base-stat] 234 - fd=24 214 + [event29:base-stat] 215 + fd=29 235 216 type=3 236 217 config=1 237 218 optional=1 ··· 240 221 # PERF_COUNT_HW_CACHE_L1I << 0 | 241 222 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 242 223 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 243 - [event25:base-stat] 244 - fd=25 224 + [event30:base-stat] 225 + fd=30 245 226 type=3 246 227 config=65537 247 228 optional=1 ··· 250 231 # PERF_COUNT_HW_CACHE_DTLB << 0 | 251 232 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 252 233 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 253 - [event26:base-stat] 254 - fd=26 234 + [event31:base-stat] 235 + fd=31 255 236 type=3 256 237 config=3 257 238 optional=1 ··· 260 241 # PERF_COUNT_HW_CACHE_DTLB << 0 | 261 242 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 262 243 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 263 - [event27:base-stat] 264 - fd=27 244 + [event32:base-stat] 245 + fd=32 265 246 type=3 266 247 config=65539 267 248 optional=1 ··· 270 251 # PERF_COUNT_HW_CACHE_ITLB << 0 | 271 252 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 272 253 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 273 - [event28:base-stat] 274 - fd=28 254 + [event33:base-stat] 255 + fd=33 275 256 type=3 276 257 config=4 277 258 optional=1 ··· 280 261 # PERF_COUNT_HW_CACHE_ITLB << 0 | 281 262 # (PERF_COUNT_HW_CACHE_OP_READ << 8) | 282 263 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 283 - [event29:base-stat] 284 - fd=29 264 + [event34:base-stat] 265 + fd=34 285 266 type=3 286 267 config=65540 287 268 optional=1 ··· 290 271 # PERF_COUNT_HW_CACHE_L1D << 0 | 291 272 # (PERF_COUNT_HW_CACHE_OP_PREFETCH << 8) | 292 273 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16) 293 - [event30:base-stat] 294 - fd=30 274 + [event35:base-stat] 275 + fd=35 295 276 type=3 296 277 config=512 297 278 optional=1 ··· 300 281 # PERF_COUNT_HW_CACHE_L1D << 0 | 301 282 # (PERF_COUNT_HW_CACHE_OP_PREFETCH << 8) | 302 283 # (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) 303 - [event31:base-stat] 304 - fd=31 284 + [event36:base-stat] 285 + fd=36 305 286 type=3 306 287 config=66048 307 288 optional=1
+2
tools/perf/trace/beauty/arch_prctl.c
··· 12 12 13 13 static DEFINE_STRARRAY_OFFSET(x86_arch_prctl_codes_1, "ARCH_", x86_arch_prctl_codes_1_offset); 14 14 static DEFINE_STRARRAY_OFFSET(x86_arch_prctl_codes_2, "ARCH_", x86_arch_prctl_codes_2_offset); 15 + static DEFINE_STRARRAY_OFFSET(x86_arch_prctl_codes_3, "ARCH_", x86_arch_prctl_codes_3_offset); 15 16 16 17 static struct strarray *x86_arch_prctl_codes[] = { 17 18 &strarray__x86_arch_prctl_codes_1, 18 19 &strarray__x86_arch_prctl_codes_2, 20 + &strarray__x86_arch_prctl_codes_3, 19 21 }; 20 22 21 23 static DEFINE_STRARRAYS(x86_arch_prctl_codes);
+1
tools/perf/trace/beauty/x86_arch_prctl.sh
··· 24 24 25 25 print_range 1 0x1 0x1001 26 26 print_range 2 0x2 0x2001 27 + print_range 3 0x4 0x4001
+1 -1
tools/perf/util/metricgroup.c
··· 1719 1719 { 1720 1720 unsigned int *max_level = data; 1721 1721 unsigned int level; 1722 - const char *p = strstr(pm->metric_group, "TopdownL"); 1722 + const char *p = strstr(pm->metric_group ?: "", "TopdownL"); 1723 1723 1724 1724 if (!p || p[8] == '\0') 1725 1725 return 0;