diff options
author | Robert Richter <robert.richter@amd.com> | 2009-01-08 08:27:34 -0500 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-01-08 08:27:34 -0500 |
commit | d2852b932f0bb5e89177aa27c7bcf07f4167e129 (patch) | |
tree | 96d975ae155ba307acd07968939fff22afedddf7 /include | |
parent | 4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff) | |
parent | 14f0ca8eaea42a5b5a69cfcb699665dd2618db5f (diff) |
Merge branch 'oprofile/ring_buffer' into oprofile/oprofile-for-tip
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/oprofile.h | 21 | ||||
-rw-r--r-- | include/linux/ring_buffer.h | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 5231861f357d..1d9518bc4c58 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
@@ -86,8 +86,7 @@ int oprofile_arch_init(struct oprofile_operations * ops); | |||
86 | void oprofile_arch_exit(void); | 86 | void oprofile_arch_exit(void); |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Add a sample. This may be called from any context. Pass | 89 | * Add a sample. This may be called from any context. |
90 | * smp_processor_id() as cpu. | ||
91 | */ | 90 | */ |
92 | void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); | 91 | void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); |
93 | 92 | ||
@@ -165,4 +164,22 @@ void oprofile_put_buff(unsigned long *buf, unsigned int start, | |||
165 | unsigned long oprofile_get_cpu_buffer_size(void); | 164 | unsigned long oprofile_get_cpu_buffer_size(void); |
166 | void oprofile_cpu_buffer_inc_smpl_lost(void); | 165 | void oprofile_cpu_buffer_inc_smpl_lost(void); |
167 | 166 | ||
167 | /* cpu buffer functions */ | ||
168 | |||
169 | struct op_sample; | ||
170 | |||
171 | struct op_entry { | ||
172 | struct ring_buffer_event *event; | ||
173 | struct op_sample *sample; | ||
174 | unsigned long irq_flags; | ||
175 | unsigned long size; | ||
176 | unsigned long *data; | ||
177 | }; | ||
178 | |||
179 | void oprofile_write_reserve(struct op_entry *entry, | ||
180 | struct pt_regs * const regs, | ||
181 | unsigned long pc, int code, int size); | ||
182 | int oprofile_add_data(struct op_entry *entry, unsigned long val); | ||
183 | int oprofile_write_commit(struct op_entry *entry); | ||
184 | |||
168 | #endif /* OPROFILE_H */ | 185 | #endif /* OPROFILE_H */ |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index e097c2e6b6dc..de9d8c12e5ec 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -116,6 +116,8 @@ void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu); | |||
116 | 116 | ||
117 | unsigned long ring_buffer_entries(struct ring_buffer *buffer); | 117 | unsigned long ring_buffer_entries(struct ring_buffer *buffer); |
118 | unsigned long ring_buffer_overruns(struct ring_buffer *buffer); | 118 | unsigned long ring_buffer_overruns(struct ring_buffer *buffer); |
119 | unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu); | ||
120 | unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu); | ||
119 | 121 | ||
120 | u64 ring_buffer_time_stamp(int cpu); | 122 | u64 ring_buffer_time_stamp(int cpu); |
121 | void ring_buffer_normalize_time_stamp(int cpu, u64 *ts); | 123 | void ring_buffer_normalize_time_stamp(int cpu, u64 *ts); |