Merge tag 'perf-core-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Oct 2022 16:27:46 +0000 (09:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Oct 2022 16:27:46 +0000 (09:27 -0700)
Pull perf events updates from Ingo Molnar:
 "PMU driver updates:

   - Add AMD Last Branch Record Extension Version 2 (LbrExtV2) feature
     support for Zen 4 processors.

   - Extend the perf ABI to provide branch speculation information, if
     available, and use this on CPUs that have it (eg. LbrExtV2).

   - Improve Intel PEBS TSC timestamp handling & integration.

   - Add Intel Raptor Lake S CPU support.

   - Add 'perf mem' and 'perf c2c' memory profiling support on AMD CPUs
     by utilizing IBS tagged load/store samples.

   - Clean up & optimize various x86 PMU details.

  HW breakpoints:

   - Big rework to optimize the code for systems with hundreds of CPUs
     and thousands of breakpoints:

      - Replace the nr_bp_mutex global mutex with the bp_cpuinfo_sem
        per-CPU rwsem that is read-locked during most of the key
        operations.

      - Improve the O(#cpus * #tasks) logic in toggle_bp_slot() and
        fetch_bp_busy_slots().

      - Apply micro-optimizations & cleanups.

  - Misc cleanups & enhancements"

* tag 'perf-core-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (75 commits)
  perf/hw_breakpoint: Annotate tsk->perf_event_mutex vs ctx->mutex
  perf: Fix pmu_filter_match()
  perf: Fix lockdep_assert_event_ctx()
  perf/x86/amd/lbr: Adjust LBR regardless of filtering
  perf/x86/utils: Fix uninitialized var in get_branch_type()
  perf/uapi: Define PERF_MEM_SNOOPX_PEER in kernel header file
  perf/x86/amd: Support PERF_SAMPLE_PHY_ADDR
  perf/x86/amd: Support PERF_SAMPLE_ADDR
  perf/x86/amd: Support PERF_SAMPLE_{WEIGHT|WEIGHT_STRUCT}
  perf/x86/amd: Support PERF_SAMPLE_DATA_SRC
  perf/x86/amd: Add IBS OP_DATA2 DataSrc bit definitions
  perf/mem: Introduce PERF_MEM_LVLNUM_{EXTN_MEM|IO}
  perf/x86/uncore: Add new Raptor Lake S support
  perf/x86/cstate: Add new Raptor Lake S support
  perf/x86/msr: Add new Raptor Lake S support
  perf/x86: Add new Raptor Lake S support
  bpf: Check flags for branch stack in bpf_read_branch_records helper
  perf, hw_breakpoint: Fix use-after-free if perf_event_open() fails
  perf: Use sample_flags for raw_data
  perf: Use sample_flags for addr
  ...

1  2 
arch/powerpc/perf/core-book3s.c
arch/x86/events/intel/core.c
arch/x86/events/intel/ds.c
arch/x86/events/perf_event.h
arch/x86/include/asm/msr-index.h
drivers/perf/arm_spe_pmu.c
kernel/events/core.c
kernel/trace/bpf_trace.c
lib/Kconfig.debug

Simple merge
index c20d8cd47c484ef6c367e1c2d436349f9860d07f,3939debb27e79ae88227d25e0397b6a96203d514..a646a5f9a235c1055e13990ab615369e1fdc1a40
@@@ -6356,8 -6341,10 +6380,9 @@@ __init int intel_pmu_init(void
  
        case INTEL_FAM6_ALDERLAKE:
        case INTEL_FAM6_ALDERLAKE_L:
 -      case INTEL_FAM6_ALDERLAKE_N:
        case INTEL_FAM6_RAPTORLAKE:
        case INTEL_FAM6_RAPTORLAKE_P:
+       case INTEL_FAM6_RAPTORLAKE_S:
                /*
                 * Alder Lake has 2 types of CPU, core and atom.
                 *
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index a05cd9dc5f8b3df9618a25bb08c1648713301412,624176f97af5a8ffa82151c62a66dd3a9fc17c17..405c8634d02880aafee25b6de153eef03e96fdee
@@@ -2547,15 -2535,16 +2547,25 @@@ config STACKINIT_KUNIT_TES
          CONFIG_GCC_PLUGIN_STRUCTLEAK, CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF,
          or CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL.
  
 +config FORTIFY_KUNIT_TEST
 +      tristate "Test fortified str*() and mem*() function internals at runtime" if !KUNIT_ALL_TESTS
 +      depends on KUNIT && FORTIFY_SOURCE
 +      default KUNIT_ALL_TESTS
 +      help
 +        Builds unit tests for checking internals of FORTIFY_SOURCE as used
 +        by the str*() and mem*() family of functions. For testing runtime
 +        traps of FORTIFY_SOURCE, see LKDTM's "FORTIFY_*" tests.
 +
+ config HW_BREAKPOINT_KUNIT_TEST
+       bool "Test hw_breakpoint constraints accounting" if !KUNIT_ALL_TESTS
+       depends on HAVE_HW_BREAKPOINT
+       depends on KUNIT=y
+       default KUNIT_ALL_TESTS
+       help
+         Tests for hw_breakpoint constraints accounting.
+         If unsure, say N.
  config TEST_UDELAY
        tristate "udelay test driver"
        help