summaryrefslogtreecommitdiffstats
path: root/arch/x86/events/core.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-05-12 17:55:13 +0200
committerIngo Molnar <mingo@kernel.org>2019-06-03 11:58:23 +0200
commitbaa0c83363c7aafb04734acf4ac252be8e13bd88 (patch)
tree69cbdf2cfc9a34fad684a355264877f9f390ec21 /arch/x86/events/core.c
parent21b0dbc5e8b050e40a93a1f8cdef277502a4fc90 (diff)
downloadlinux-stable-baa0c83363c7aafb04734acf4ac252be8e13bd88.tar.gz
linux-stable-baa0c83363c7aafb04734acf4ac252be8e13bd88.tar.bz2
linux-stable-baa0c83363c7aafb04734acf4ac252be8e13bd88.zip
perf/x86: Use the new pmu::update_attrs attribute group
Using the new pmu::update_attrs attribute group to create detected events for x86_pmu. Moving the topdown/memory/tsx attributes to separate attribute groups with specific is_visible functions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20190512155518.21468-5-jolsa@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/events/core.c')
-rw-r--r--arch/x86/events/core.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 0c5a2c783374..db815ceb5017 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -1855,14 +1855,6 @@ static int __init init_hw_perf_events(void)
else
filter_events(x86_pmu_events_group.attrs);
- if (x86_pmu.cpu_events) {
- struct attribute **tmp;
-
- tmp = merge_attr(x86_pmu_events_group.attrs, x86_pmu.cpu_events);
- if (!WARN_ON(!tmp))
- x86_pmu_events_group.attrs = tmp;
- }
-
if (x86_pmu.attrs) {
struct attribute **tmp;
@@ -1871,6 +1863,8 @@ static int __init init_hw_perf_events(void)
x86_pmu_attr_group.attrs = tmp;
}
+ pmu.attr_update = x86_pmu.attr_update;
+
pr_info("... version: %d\n", x86_pmu.version);
pr_info("... bit width: %d\n", x86_pmu.cntval_bits);
pr_info("... generic registers: %d\n", x86_pmu.num_counters);