From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754160AbcB2LHa (ORCPT ); Mon, 29 Feb 2016 06:07:30 -0500 Received: from torg.zytor.com ([198.137.202.12]:53510 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752076AbcB2LH2 (ORCPT ); Mon, 29 Feb 2016 06:07:28 -0500 Date: Mon, 29 Feb 2016 03:06:26 -0800 From: tip-bot for Thomas Gleixner Message-ID: Cc: vincent.weaver@maine.edu, acme@redhat.com, mingo@kernel.org, bp@alien8.de, peterz@infradead.org, eranian@google.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, kan.liang@intel.com, jolsa@redhat.com, harish.chegondi@intel.com, andi.kleen@intel.com, torvalds@linux-foundation.org, hpa@zytor.com, jacob.jun.pan@linux.intel.com Reply-To: bp@alien8.de, peterz@infradead.org, mingo@kernel.org, eranian@google.com, linux-kernel@vger.kernel.org, vincent.weaver@maine.edu, acme@redhat.com, harish.chegondi@intel.com, andi.kleen@intel.com, hpa@zytor.com, torvalds@linux-foundation.org, jacob.jun.pan@linux.intel.com, tglx@linutronix.de, kan.liang@intel.com, jolsa@redhat.com In-Reply-To: <20160222221011.364140369@linutronix.de> References: <20160222221011.364140369@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf: Allow storage of PMU private data in event Git-Commit-ID: 54d751d4ad357c817907fe89db3222b97ff66db3 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 54d751d4ad357c817907fe89db3222b97ff66db3 Gitweb: http://git.kernel.org/tip/54d751d4ad357c817907fe89db3222b97ff66db3 Author: Thomas Gleixner AuthorDate: Mon, 22 Feb 2016 22:19:14 +0000 Committer: Ingo Molnar CommitDate: Mon, 29 Feb 2016 09:35:16 +0100 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 --- include/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f5c5a3f..a9d8cab 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;