aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2009-01-08 08:27:34 -0500
committerRobert Richter <robert.richter@amd.com>2009-01-08 08:27:34 -0500
commitd2852b932f0bb5e89177aa27c7bcf07f4167e129 (patch)
tree96d975ae155ba307acd07968939fff22afedddf7 /include
parent4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff)
parent14f0ca8eaea42a5b5a69cfcb699665dd2618db5f (diff)
Merge branch 'oprofile/ring_buffer' into oprofile/oprofile-for-tip
Diffstat (limited to 'include')
-rw-r--r--include/linux/oprofile.h21
-rw-r--r--include/linux/ring_buffer.h2
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);
86void oprofile_arch_exit(void); 86void 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 */
92void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); 91void 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,
165unsigned long oprofile_get_cpu_buffer_size(void); 164unsigned long oprofile_get_cpu_buffer_size(void);
166void oprofile_cpu_buffer_inc_smpl_lost(void); 165void oprofile_cpu_buffer_inc_smpl_lost(void);
167 166
167/* cpu buffer functions */
168
169struct op_sample;
170
171struct 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
179void oprofile_write_reserve(struct op_entry *entry,
180 struct pt_regs * const regs,
181 unsigned long pc, int code, int size);
182int oprofile_add_data(struct op_entry *entry, unsigned long val);
183int 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
117unsigned long ring_buffer_entries(struct ring_buffer *buffer); 117unsigned long ring_buffer_entries(struct ring_buffer *buffer);
118unsigned long ring_buffer_overruns(struct ring_buffer *buffer); 118unsigned long ring_buffer_overruns(struct ring_buffer *buffer);
119unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu);
120unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu);
119 121
120u64 ring_buffer_time_stamp(int cpu); 122u64 ring_buffer_time_stamp(int cpu);
121void ring_buffer_normalize_time_stamp(int cpu, u64 *ts); 123void ring_buffer_normalize_time_stamp(int cpu, u64 *ts);