Skip to content

Commit 42dec9a

Browse files
committed
Merge tag 'perf-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf event updates from Ingo Molnar: - Improve Intel uncore PMU support: - Parse uncore 'discovery tables' - a new hardware capability enumeration method introduced on the latest Intel platforms. This table is in a well-defined PCI namespace location and is read via MMIO. It is organized in an rbtree. These uncore tables will allow the discovery of standard counter blocks, but fancier counters still need to be enumerated explicitly. - Add Alder Lake support - Improve IIO stacks to PMON mapping support on Skylake servers - Add Intel Alder Lake PMU support - which requires the introduction of 'hybrid' CPUs and PMUs. Alder Lake is a mix of Golden Cove ('big') and Gracemont ('small' - Atom derived) cores. The CPU-side feature set is entirely symmetrical - but on the PMU side there's core type dependent PMU functionality. - Reduce data loss with CPU level hardware tracing on Intel PT / AUX profiling, by fixing the AUX allocation watermark logic. - Improve ring buffer allocation on NUMA systems - Put 'struct perf_event' into their separate kmem_cache pool - Add support for synchronous signals for select perf events. The immediate motivation is to support low-overhead sampling-based race detection for user-space code. The feature consists of the following main changes: - Add thread-only event inheritance via perf_event_attr::inherit_thread, which limits inheritance of events to CLONE_THREAD. - Add the ability for events to not leak through exec(), via perf_event_attr::remove_on_exec. - Allow the generation of SIGTRAP via perf_event_attr::sigtrap, extend siginfo with an u64 ::si_perf, and add the breakpoint information to ::si_addr and ::si_perf if the event is PERF_TYPE_BREAKPOINT. The siginfo support is adequate for breakpoints right now - but the new field can be used to introduce support for other types of metadata passed over siginfo as well. - Misc fixes, cleanups and smaller updates. * tag 'perf-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits) signal, perf: Add missing TRAP_PERF case in siginfo_layout() signal, perf: Fix siginfo_t by avoiding u64 on 32-bit architectures perf/x86: Allow for 8<num_fixed_counters<16 perf/x86/rapl: Add support for Intel Alder Lake perf/x86/cstate: Add Alder Lake CPU support perf/x86/msr: Add Alder Lake CPU support perf/x86/intel/uncore: Add Alder Lake support perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE perf/x86/intel: Add Alder Lake Hybrid support perf/x86: Support filter_match callback perf/x86/intel: Add attr_update for Hybrid PMUs perf/x86: Add structures for the attributes of Hybrid PMUs perf/x86: Register hybrid PMUs perf/x86: Factor out x86_pmu_show_pmu_cap perf/x86: Remove temporary pmu assignment in event_init perf/x86/intel: Factor out intel_pmu_check_extra_regs perf/x86/intel: Factor out intel_pmu_check_event_constraints perf/x86/intel: Factor out intel_pmu_check_num_counters perf/x86: Hybrid PMU support for extra_regs perf/x86: Hybrid PMU support for event constraints ...
2 parents 03b2cd7 + ed8e508 commit 42dec9a

42 files changed

Lines changed: 3055 additions & 417 deletions

Some content is hidden

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

arch/m68k/kernel/signal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ static inline void siginfo_build_tests(void)
622622
/* _sigfault._addr_pkey */
623623
BUILD_BUG_ON(offsetof(siginfo_t, si_pkey) != 0x12);
624624

625+
/* _sigfault._perf */
626+
BUILD_BUG_ON(offsetof(siginfo_t, si_perf) != 0x10);
627+
625628
/* _sigpoll */
626629
BUILD_BUG_ON(offsetof(siginfo_t, si_band) != 0x0c);
627630
BUILD_BUG_ON(offsetof(siginfo_t, si_fd) != 0x10);

arch/x86/events/amd/iommu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ static struct attribute_group amd_iommu_events_group = {
8181
};
8282

8383
struct amd_iommu_event_desc {
84-
struct kobj_attribute attr;
84+
struct device_attribute attr;
8585
const char *event;
8686
};
8787

88-
static ssize_t _iommu_event_show(struct kobject *kobj,
89-
struct kobj_attribute *attr, char *buf)
88+
static ssize_t _iommu_event_show(struct device *dev,
89+
struct device_attribute *attr, char *buf)
9090
{
9191
struct amd_iommu_event_desc *event =
9292
container_of(attr, struct amd_iommu_event_desc, attr);

arch/x86/events/amd/uncore.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,14 @@ static struct attribute_group amd_uncore_attr_group = {
275275
};
276276

277277
#define DEFINE_UNCORE_FORMAT_ATTR(_var, _name, _format) \
278-
static ssize_t __uncore_##_var##_show(struct kobject *kobj, \
279-
struct kobj_attribute *attr, \
278+
static ssize_t __uncore_##_var##_show(struct device *dev, \
279+
struct device_attribute *attr, \
280280
char *page) \
281281
{ \
282282
BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE); \
283283
return sprintf(page, _format "\n"); \
284284
} \
285-
static struct kobj_attribute format_attr_##_var = \
285+
static struct device_attribute format_attr_##_var = \
286286
__ATTR(_name, 0444, __uncore_##_var##_show, NULL)
287287

288288
DEFINE_UNCORE_FORMAT_ATTR(event12, event, "config:0-7,32-35");

0 commit comments

Comments
 (0)