Skip to content

Commit

Permalink
perf: Per-pmu-per-cpu contexts
Browse files Browse the repository at this point in the history
Allocate per-cpu contexts per pmu.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus <paulus@samba.org>
Cc: stephane eranian <eranian@googlemail.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Yanmin <yanmin_zhang@linux.intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 9, 2010
1 parent b5ab4cd commit 108b02c
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 69 deletions.
4 changes: 3 additions & 1 deletion include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ struct perf_event;
struct pmu {
struct list_head entry;

int *pmu_disable_count;
int * __percpu pmu_disable_count;
struct perf_cpu_context * __percpu pmu_cpu_context;

/*
* Fully disable/enable this PMU, can be used to protect from the PMI
Expand Down Expand Up @@ -808,6 +809,7 @@ struct perf_event {
* Used as a container for task events and CPU events as well:
*/
struct perf_event_context {
struct pmu *pmu;
/*
* Protect the states of the events in the list,
* nr_active, and the list:
Expand Down
Loading

0 comments on commit 108b02c

Please sign in to comment.