summaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-03-18 16:56:41 +0800
committerIngo Molnar <mingo@kernel.org>2014-04-18 12:54:45 +0200
commitc464c76eec4be587604ca082e8cded7e6b89f3bf (patch)
tree673036d1b0058e3703ef53b69cf7547ae469141d /include/linux/perf_event.h
parent1111b680d34bc19190f02a1b4479c3fcc592c22e (diff)
downloadop-kernel-dev-c464c76eec4be587604ca082e8cded7e6b89f3bf.zip
op-kernel-dev-c464c76eec4be587604ca082e8cded7e6b89f3bf.tar.gz
perf: Allow building PMU drivers as modules
This patch adds support for building PMU driver as module. It exports the functions perf_pmu_{register,unregister}() and adds reference tracking for the PMU driver module. When the PMU driver is built as a module, each active event of the PMU holds a reference to the driver module. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1395133004-23205-1-git-send-email-zheng.z.yan@intel.com Cc: eranian@google.com Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 3356abc..af6dcf1 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -172,6 +172,7 @@ struct perf_event;
struct pmu {
struct list_head entry;
+ struct module *module;
struct device *dev;
const struct attribute_group **attr_groups;
const char *name;
OpenPOWER on IntegriCloud