aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-03-13 07:21:36 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-06 03:29:43 -0400
commit592903cdcbf606a838056bae6d03fc557806c914 (patch)
tree6851004446a405654ff3f1c39a70b313456544a5 /include/linux/perf_counter.h
parentd6d020e9957745c61285ef3da9f294c5e6801f0f (diff)
perf_counter: add an event_list
I noticed that the counter_list only includes top-level counters, thus perf_swcounter_event() will miss sw-counters in groups. Since perf_swcounter_event() also wants an RCU safe list, create a new event_list that includes all counters and uses RCU list ops and use call_rcu to free the counter structure. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index dfb4c7ce18b3..08c11a6afebc 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -187,6 +187,7 @@ struct file;
187struct perf_counter { 187struct perf_counter {
188#ifdef CONFIG_PERF_COUNTERS 188#ifdef CONFIG_PERF_COUNTERS
189 struct list_head list_entry; 189 struct list_head list_entry;
190 struct list_head event_entry;
190 struct list_head sibling_list; 191 struct list_head sibling_list;
191 struct perf_counter *group_leader; 192 struct perf_counter *group_leader;
192 const struct hw_perf_counter_ops *hw_ops; 193 const struct hw_perf_counter_ops *hw_ops;
@@ -220,6 +221,8 @@ struct perf_counter {
220 struct perf_data *irqdata; 221 struct perf_data *irqdata;
221 struct perf_data *usrdata; 222 struct perf_data *usrdata;
222 struct perf_data data[2]; 223 struct perf_data data[2];
224
225 struct rcu_head rcu_head;
223#endif 226#endif
224}; 227};
225 228
@@ -243,6 +246,7 @@ struct perf_counter_context {
243 struct mutex mutex; 246 struct mutex mutex;
244 247
245 struct list_head counter_list; 248 struct list_head counter_list;
249 struct list_head event_list;
246 int nr_counters; 250 int nr_counters;
247 int nr_active; 251 int nr_active;
248 int is_active; 252 int is_active;