diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/perf_counter.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 7af7d8965460..27385641ecb6 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -113,6 +113,17 @@ struct perf_data { | |||
113 | u8 data[PERF_DATA_BUFLEN]; | 113 | u8 data[PERF_DATA_BUFLEN]; |
114 | }; | 114 | }; |
115 | 115 | ||
116 | struct perf_counter; | ||
117 | |||
118 | /** | ||
119 | * struct hw_perf_counter_ops - performance counter hw ops | ||
120 | */ | ||
121 | struct hw_perf_counter_ops { | ||
122 | void (*hw_perf_counter_enable) (struct perf_counter *counter); | ||
123 | void (*hw_perf_counter_disable) (struct perf_counter *counter); | ||
124 | void (*hw_perf_counter_read) (struct perf_counter *counter); | ||
125 | }; | ||
126 | |||
116 | /** | 127 | /** |
117 | * struct perf_counter - performance counter kernel representation: | 128 | * struct perf_counter - performance counter kernel representation: |
118 | */ | 129 | */ |
@@ -120,6 +131,7 @@ struct perf_counter { | |||
120 | struct list_head list_entry; | 131 | struct list_head list_entry; |
121 | struct list_head sibling_list; | 132 | struct list_head sibling_list; |
122 | struct perf_counter *group_leader; | 133 | struct perf_counter *group_leader; |
134 | struct hw_perf_counter_ops *hw_ops; | ||
123 | 135 | ||
124 | int active; | 136 | int active; |
125 | #if BITS_PER_LONG == 64 | 137 | #if BITS_PER_LONG == 64 |
@@ -185,6 +197,9 @@ struct perf_cpu_context { | |||
185 | extern int perf_max_counters; | 197 | extern int perf_max_counters; |
186 | 198 | ||
187 | #ifdef CONFIG_PERF_COUNTERS | 199 | #ifdef CONFIG_PERF_COUNTERS |
200 | extern struct hw_perf_counter_ops * | ||
201 | hw_perf_counter_init(struct perf_counter *counter); | ||
202 | |||
188 | extern void perf_counter_task_sched_in(struct task_struct *task, int cpu); | 203 | extern void perf_counter_task_sched_in(struct task_struct *task, int cpu); |
189 | extern void perf_counter_task_sched_out(struct task_struct *task, int cpu); | 204 | extern void perf_counter_task_sched_out(struct task_struct *task, int cpu); |
190 | extern void perf_counter_task_tick(struct task_struct *task, int cpu); | 205 | extern void perf_counter_task_tick(struct task_struct *task, int cpu); |