Commit c7decec2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-for-v7.0-1-2026-02-21' of...

Merge tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools updates from Arnaldo Carvalho de Melo:

 - Introduce 'perf sched stats' tool with record/report/diff workflows
   using schedstat counters

 - Add a faster libdw based addr2line implementation and allow selecting
   it or its alternatives via 'perf config addr2line.style='

 - Data-type profiling fixes and improvements including the ability to
   select fields using 'perf report''s -F/-fields, e.g.:

     'perf report --fields overhead,type'

 - Add 'perf test' regression tests for Data-type profiling with C and
   Rust workloads

 - Fix srcline printing with inlines in callchains, make sure this has
   coverage in 'perf test'

 - Fix printing of leaf IP in LBR callchains

 - Fix display of metrics without sufficient permission in 'perf stat'

 - Print all machines in 'perf kvm report -vvv', not just the host

 - Switch from SHA-1 to BLAKE2s for build ID generation, remove SHA-1
   code

 - Fix 'perf report's histogram entry collapsing with '-F' option

 - Use system's cacheline size instead of a hardcoded value in 'perf
   report'

 - Allow filtering conversion by time range in 'perf data'

 - Cover conversion to CTF using 'perf data' in 'perf test'

 - Address newer glibc const-correctness (-Werror=discarded-qualifiers)
   issues

 - Fixes and improvements for ARM's CoreSight support, simplify ARM SPE
   event config in 'perf mem', update docs for 'perf c2c' including the
   ARM events it can be used with

 - Build support for generating metrics from arch specific python
   script, add extra AMD, Intel, ARM64 metrics using it

 - Add AMD Zen 6 events and metrics

 - Add JSON file with OpenHW Risc-V CVA6 hardware counters

 - Add 'perf kvm' stats live testing

 - Add more 'perf stat' tests to 'perf test'

 - Fix segfault in `perf lock contention -b/--use-bpf`

 - Fix various 'perf test' cases for s390

 - Build system cleanups, bump minimum shellcheck version to 0.7.2

 - Support building the capstone based annotation routines as a plugin

 - Allow passing extra Clang flags via EXTRA_BPF_FLAGS

* tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (255 commits)
  perf test script: Add python script testing support
  perf test script: Add perl script testing support
  perf script: Allow the generated script to be a path
  perf test: perf data --to-ctf testing
  perf test: Test pipe mode with data conversion --to-json
  perf json: Pipe mode --to-ctf support
  perf json: Pipe mode --to-json support
  perf check: Add libbabeltrace to the listed features
  perf build: Allow passing extra Clang flags via EXTRA_BPF_FLAGS
  perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing
  tools build: Fix feature test for rust compiler
  perf libunwind: Fix calls to thread__e_machine()
  perf stat: Add no-affinity flag
  perf evlist: Reduce affinity use and move into iterator, fix no affinity
  perf evlist: Missing TPEBS close in evlist__close()
  perf evlist: Special map propagation for tool events that read on 1 CPU
  perf stat-shadow: In prepare_metric fix guard on reading NULL perf_stat_evsel
  Revert "perf tool_pmu: More accurately set the cpus for tool events"
  tools build: Emit dependencies file for test-rust.bin
  tools build: Make test-rust.bin be removed by the 'clean' target
  ...
parents 3544d5ce dbf01083
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#include <asm/unistd_64.h>
/*
 * Copyright (C) 2012 ARM Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#define __ARCH_WANT_RENAMEAT
#define __ARCH_WANT_NEW_STAT
#define __ARCH_WANT_SET_GET_RLIMIT
#define __ARCH_WANT_TIME32_SYSCALLS
#define __ARCH_WANT_MEMFD_SECRET

#include <asm-generic/unistd.h>
+14 −0
Original line number Diff line number Diff line
@@ -76,6 +76,14 @@ quiet_cmd_host_ld_multi = HOSTLD $@
      cmd_host_ld_multi = $(if $(strip $(obj-y)),\
                          $(HOSTLD) -r -o $@  $(filter $(obj-y),$^),rm -f $@; $(HOSTAR) rcs $@)

rust_common_cmd = \
	$(RUSTC) $(rust_flags) \
	--crate-type staticlib -L $(objtree)/rust/ \
	--emit=dep-info=$(depfile),link

quiet_cmd_rustc_a_rs = $(RUSTC) $(quiet_modtag) $@
      cmd_rustc_a_rs = $(rust_common_cmd) -o $@ -g $< $(cmd_objtool)

ifneq ($(filter $(obj),$(hostprogs)),)
  host = host_
endif
@@ -105,6 +113,12 @@ $(OUTPUT)%.s: %.c FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_s_c)

# it's recommended to build a static rust library, when a foreight (to rust)
# linker is used.
$(OUTPUT)%.a: %.rs FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,rustc_a_rs)

# bison and flex files are generated in the OUTPUT directory
# so it needs a separate rule to depend on them properly
$(OUTPUT)%-bison.o: $(OUTPUT)%-bison.c FORCE
+3 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ FEATURE_TESTS_BASIC := \
        gettid				\
        glibc                           \
        libbfd                          \
        libbfd-buildid			\
	libbfd-threadsafe		\
        libelf                          \
        libelf-getphdrnum               \
        libelf-gelf_getnote             \
@@ -149,7 +149,8 @@ FEATURE_DISPLAY ?= \
         bpf			\
         libaio			\
         libzstd		\
         libopenssl
         libopenssl		\
         rust

#
# Declare group members of a feature to display the logical OR of the detection
+12 −2
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ FILES= \
         test-gtk2-infobar.bin                  \
         test-hello.bin                         \
         test-libbfd.bin                        \
         test-libbfd-buildid.bin		\
	 test-libbfd-threadsafe.bin      	\
         test-disassembler-four-args.bin        \
         test-disassembler-init-styled.bin	\
         test-reallocarray.bin			\
@@ -73,6 +73,7 @@ FILES= \
         test-clang-bpf-co-re.bin		\
         test-file-handle.bin			\
         test-libpfm4.bin			\
         test-rust.bin				\
         test-libopenssl.bin

FILES := $(addprefix $(OUTPUT),$(FILES))
@@ -268,7 +269,7 @@ $(OUTPUT)test-libpython.bin:
$(OUTPUT)test-libbfd.bin:
	$(BUILD_BFD)

$(OUTPUT)test-libbfd-buildid.bin:
$(OUTPUT)test-libbfd-threadsafe.bin:
	$(BUILD_BFD) || $(BUILD_BFD) -liberty || $(BUILD_BFD) -liberty -lz

$(OUTPUT)test-disassembler-four-args.bin:
@@ -388,6 +389,15 @@ $(OUTPUT)test-libopenssl.bin:
$(OUTPUT)test-bpftool-skeletons.bin:
	$(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons' \
		> $(@:.bin=.make.output) 2>&1

# Testing Rust is special: we don't compile anything, it's enough to check the
# compiler presence. Compiling a test code for this purposes is problematic,
# because Rust will emit a dependency file without any external references,
# meaning that if rustc will be removed the build process will still think it's
# there.
$(OUTPUT)test-rust.bin:
	$(RUSTC) --version > /dev/null 2>&1

###############################

clean:
+0 −8
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
#include <bfd.h>

int main(void)
{
	bfd *abfd = bfd_openr("Pedro", 0);
	return abfd && (!abfd->build_id || abfd->build_id->size > 0x506564726f);
}
Loading