summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-07-02 12:24:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-02 12:24:31 -0700
commit406254918b232db198ed60f5bf1f8b84d96bca00 (patch)
tree98ac344a31aa65577eea707e330c951fb2cc66f3
parent71bd9341011f626d692aabe024f099820f02c497 (diff)
parentcf96b8e45a9bf74d2a6f1e1f88a41b10e9357c6b (diff)
downloadlinux-406254918b232db198ed60f5bf1f8b84d96bca00.tar.gz
linux-406254918b232db198ed60f5bf1f8b84d96bca00.tar.bz2
linux-406254918b232db198ed60f5bf1f8b84d96bca00.zip
Merge tag 'perf-tools-for-v5.14-2021-07-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tool updates from Arnaldo Carvalho de Melo: "Tools: - Add cgroup support for 'perf top' (-G). - Add support for KVM MSRs in 'perf kvm stat' - Support probes on init functions in 'perf probe', to support the bootconfig format. - Improve error reporting in 'perf probe'. - No need to synthesize BUILD_ID records in 'perf inject' if the MMAP2 records have build ids already. - Allow toggling source code ('s' hotkey) in 'perf annotate' in all lines. - Add itrace options support to 'perf annotate'. - Support to custom DSO filters for 'perf script'. Hardware enablement: - Support the HYBRID_TOPOLOGY and HYBRID_CPU_PMU_CAPS features in the perf.data file header. - Support PMU prefix for mem-load and mem-store events, to support hybrid (BIG little) CPUs such as Intel's Alderlake. - Support hybrid CPUs in 'perf mem' and 'perf c2c'. Hardware tracing: - Intel PT now supports tracing KVM guests. - Timestamp improvements for ARM's Coresight. Build: - Add 'make -C tools/perf build-test' entries for libopencsd/CORESIGHT=1 and libbpf/LIBBPF_DYNAMIC=1. - Use bison's --file-prefix-map option to avoid storing full paths when using O= in the perf build. Tests: - Improve the 'perf test' entries for libpfm4 and BPF counters. Misc: - Sync msr-index.h, mount.h, kvm headers with the kernel originals. - Add vendor events and metrics for Intel's Icelake Server & Client" * tag 'perf-tools-for-v5.14-2021-07-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (123 commits) perf session: Add missing evlist__delete when deleting a session perf annotate: Allow 's' on source code lines perf dlfilter: Add object_code() to perf_dlfilter_fns perf dlfilter: Add attr() to perf_dlfilter_fns perf dlfilter: Add srcline() to perf_dlfilter_fns perf dlfilter: Add insn() to perf_dlfilter_fns perf dlfilter: Add resolve_address() to perf_dlfilter_fns perf build: Install perf_dlfilter.h perf script: Add option to pass arguments to dlfilters perf script: Add option to list dlfilters perf script: Add dlfilter__filter_event_early() perf script: Add API for filtering via dynamically loaded shared object perf llvm: Return -ENOMEM when asprintf() fails perf cs-etm: Delay decode of non-timeless data until cs_etm__flush_events() tools headers UAPI: Synch KVM's svm.h header with the kernel tools kvm headers arm64: Update KVM headers from the kernel sources tools headers UAPI: Sync linux/kvm.h with the kernel sources tools headers cpufeatures: Sync with the kernel sources tools include UAPI: Update linux/mount.h copy tools arch x86: Sync the msr-index.h copy with the kernel sources ...
-rw-r--r--tools/arch/arm64/include/uapi/asm/kvm.h11
-rw-r--r--tools/arch/x86/include/asm/cpufeatures.h3
-rw-r--r--tools/arch/x86/include/asm/msr-index.h4
-rw-r--r--tools/arch/x86/include/uapi/asm/kvm.h13
-rw-r--r--tools/arch/x86/include/uapi/asm/svm.h3
-rw-r--r--tools/include/linux/bitmap.h11
-rw-r--r--tools/include/uapi/linux/kvm.h105
-rw-r--r--tools/include/uapi/linux/mount.h1
-rw-r--r--tools/lib/bitmap.c14
-rw-r--r--tools/perf/Documentation/itrace.txt1
-rw-r--r--tools/perf/Documentation/perf-annotate.txt7
-rw-r--r--tools/perf/Documentation/perf-dlfilter.txt251
-rw-r--r--tools/perf/Documentation/perf-inject.txt10
-rw-r--r--tools/perf/Documentation/perf-intel-pt.txt119
-rw-r--r--tools/perf/Documentation/perf-probe.txt19
-rw-r--r--tools/perf/Documentation/perf-script-python.txt46
-rw-r--r--tools/perf/Documentation/perf-script.txt15
-rw-r--r--tools/perf/Documentation/perf-top.txt12
-rw-r--r--tools/perf/Documentation/perf.data-file-format.txt33
-rw-r--r--tools/perf/Makefile.config14
-rw-r--r--tools/perf/Makefile.perf4
-rw-r--r--tools/perf/arch/arm/include/arch-tests.h5
-rw-r--r--tools/perf/arch/arm/util/cs-etm.c133
-rw-r--r--tools/perf/arch/arm64/include/arch-tests.h5
-rw-r--r--tools/perf/arch/arm64/util/arm-spe.c45
-rw-r--r--tools/perf/arch/arm64/util/mem-events.c2
-rw-r--r--tools/perf/arch/powerpc/include/arch-tests.h7
-rw-r--r--tools/perf/arch/powerpc/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/arch/powerpc/util/mem-events.c2
-rw-r--r--tools/perf/arch/x86/include/arch-tests.h12
-rw-r--r--tools/perf/arch/x86/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/arch/x86/util/kvm-stat.c46
-rw-r--r--tools/perf/arch/x86/util/mem-events.c54
-rw-r--r--tools/perf/builtin-annotate.c11
-rw-r--r--tools/perf/builtin-c2c.c40
-rw-r--r--tools/perf/builtin-inject.c98
-rw-r--r--tools/perf/builtin-mem.c51
-rw-r--r--tools/perf/builtin-probe.c12
-rw-r--r--tools/perf/builtin-record.c27
-rw-r--r--tools/perf/builtin-report.c2
-rw-r--r--tools/perf/builtin-script.c235
-rw-r--r--tools/perf/builtin-top.c8
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/cache.json724
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/floating-point.json101
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/frontend.json610
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json273
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/memory.json654
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/other.json1089
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/pipeline.json1169
-rw-r--r--tools/perf/pmu-events/arch/x86/icelake/virtual-memory.json251
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/cache.json706
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/floating-point.json95
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/frontend.json469
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/memory.json291
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/other.json181
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/pipeline.json972
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/uncore-memory.json333
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/uncore-other.json2476
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/uncore-power.json10
-rw-r--r--tools/perf/pmu-events/arch/x86/icelakex/virtual-memory.json245
-rw-r--r--tools/perf/pmu-events/arch/x86/mapfile.csv2
-rw-r--r--tools/perf/scripts/python/Perf-Trace-Util/Context.c168
-rw-r--r--tools/perf/scripts/python/bin/intel-pt-events-record4
-rw-r--r--tools/perf/scripts/python/bin/intel-pt-events-report4
-rwxr-xr-xtools/perf/scripts/python/exported-sql-viewer.py89
-rw-r--r--tools/perf/scripts/python/intel-pt-events.py283
-rw-r--r--tools/perf/scripts/python/libxed.py107
-rw-r--r--tools/perf/tests/builtin-test.c43
-rw-r--r--tools/perf/tests/dwarf-unwind.c4
-rw-r--r--tools/perf/tests/make7
-rw-r--r--tools/perf/tests/pfm.c10
-rwxr-xr-xtools/perf/tests/shell/stat_bpf_counters.sh16
-rw-r--r--tools/perf/tests/tests.h2
-rw-r--r--tools/perf/ui/browsers/annotate.c32
-rw-r--r--tools/perf/util/Build7
-rw-r--r--tools/perf/util/arm-spe.c73
-rw-r--r--tools/perf/util/auxtrace.c18
-rw-r--r--tools/perf/util/auxtrace.h53
-rw-r--r--tools/perf/util/bpf_counter.c52
-rw-r--r--tools/perf/util/bpf_counter.h52
-rw-r--r--tools/perf/util/cgroup.c44
-rw-r--r--tools/perf/util/cgroup.h12
-rw-r--r--tools/perf/util/cputopo.c80
-rw-r--r--tools/perf/util/cputopo.h13
-rw-r--r--tools/perf/util/cs-etm-decoder/cs-etm-decoder.c61
-rw-r--r--tools/perf/util/cs-etm.c83
-rw-r--r--tools/perf/util/cs-etm.h4
-rw-r--r--tools/perf/util/data.c3
-rw-r--r--tools/perf/util/data.h1
-rw-r--r--tools/perf/util/db-export.c12
-rw-r--r--tools/perf/util/db-export.h2
-rw-r--r--tools/perf/util/dlfilter.c615
-rw-r--r--tools/perf/util/dlfilter.h97
-rw-r--r--tools/perf/util/env.c12
-rw-r--r--tools/perf/util/env.h16
-rw-r--r--tools/perf/util/evlist.c25
-rw-r--r--tools/perf/util/evlist.h1
-rw-r--r--tools/perf/util/evsel.c25
-rw-r--r--tools/perf/util/header.c254
-rw-r--r--tools/perf/util/header.h2
-rw-r--r--tools/perf/util/intel-pt-decoder/intel-pt-decoder.c723
-rw-r--r--tools/perf/util/intel-pt-decoder/intel-pt-decoder.h20
-rw-r--r--tools/perf/util/intel-pt-decoder/intel-pt-log.h5
-rw-r--r--tools/perf/util/intel-pt.c224
-rw-r--r--tools/perf/util/llvm-utils.c2
-rw-r--r--tools/perf/util/mem-events.c103
-rw-r--r--tools/perf/util/mem-events.h4
-rw-r--r--tools/perf/util/perf_dlfilter.h150
-rw-r--r--tools/perf/util/pmu-hybrid.h11
-rw-r--r--tools/perf/util/probe-event.c203
-rw-r--r--tools/perf/util/probe-event.h2
-rw-r--r--tools/perf/util/probe-file.c95
-rw-r--r--tools/perf/util/scripting-engines/trace-event-perl.c13
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c359
-rw-r--r--tools/perf/util/session.c11
-rw-r--r--tools/perf/util/srccode.c3
-rw-r--r--tools/perf/util/stat-display.c8
-rw-r--r--tools/perf/util/stat.c12
-rw-r--r--tools/perf/util/trace-event-scripting.c32
-rw-r--r--tools/perf/util/trace-event.h29
120 files changed, 14120 insertions, 2419 deletions
diff --git a/tools/arch/arm64/include/uapi/asm/kvm.h b/tools/arch/arm64/include/uapi/asm/kvm.h
index 24223adae150..b3edde68bc3e 100644
--- a/tools/arch/arm64/include/uapi/asm/kvm.h
+++ b/tools/arch/arm64/include/uapi/asm/kvm.h
@@ -184,6 +184,17 @@ struct kvm_vcpu_events {
__u32 reserved[12];
};
+struct kvm_arm_copy_mte_tags {
+ __u64 guest_ipa;
+ __u64 length;
+ void __user *addr;
+ __u64 flags;
+ __u64 reserved[2];
+};
+
+#define KVM_ARM_TAGS_TO_GUEST 0
+#define KVM_ARM_TAGS_FROM_GUEST 1
+
/* If you need to interpret the index values, here is the key: */
#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000
#define KVM_REG_ARM_COPROC_SHIFT 16
diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h
index ac37830ae941..d0ce5cfd3ac1 100644
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -108,7 +108,7 @@
#define X86_FEATURE_EXTD_APICID ( 3*32+26) /* Extended APICID (8 bits) */
#define X86_FEATURE_AMD_DCM ( 3*32+27) /* AMD multi-node processor */
#define X86_FEATURE_APERFMPERF ( 3*32+28) /* P-State hardware coordination feedback capability (APERF/MPERF MSRs) */
-/* free ( 3*32+29) */
+#define X86_FEATURE_RAPL ( 3*32+29) /* AMD/Hygon RAPL interface */
#define X86_FEATURE_NONSTOP_TSC_S3 ( 3*32+30) /* TSC doesn't stop in S3 state */
#define X86_FEATURE_TSC_KNOWN_FREQ ( 3*32+31) /* TSC has known frequency */
@@ -378,6 +378,7 @@
#define X86_FEATURE_AVX512_VP2INTERSECT (18*32+ 8) /* AVX-512 Intersect for D/Q */
#define X86_FEATURE_SRBDS_CTRL (18*32+ 9) /* "" SRBDS mitigation MSR available */
#define X86_FEATURE_MD_CLEAR (18*32+10) /* VERW clears CPU buffers */
+#define X86_FEATURE_RTM_ALWAYS_ABORT (18*32+11) /* "" RTM transaction always aborts */
#define X86_FEATURE_TSX_FORCE_ABORT (18*32+13) /* "" TSX_FORCE_ABORT */