From: Thomas Gleixner Date: Mon, 22 Feb 2016 22:19:14 +0000 (+0000) Subject: perf: Allow storage of PMU private data in event X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54d751d4ad357c817907fe89db3222b97ff66db3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf: Allow storage of PMU private data in event For PMUs which are not per CPU, but e.g. per package/socket, we want to be able to store a reference to the underlying per package/socket facility in the event at init time so we can avoid magic storage constructs in the PMU driver. This allows us to get rid of the per CPU dance in the intel uncore and RAPL drivers and avoids a lookup of the per package data in the perf hotpath. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Andi Kleen Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Harish Chegondi Cc: Jacob Pan Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20160222221011.364140369@linutronix.de Signed-off-by: Ingo Molnar --- diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f5c5a3fa2c81..a9d8cab18b00 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -468,6 +468,7 @@ struct perf_event { int group_flags; struct perf_event *group_leader; struct pmu *pmu; + void *pmu_private; enum perf_event_active_state state; unsigned int attach_state;