diff options
author | Robert Richter <robert.richter@amd.com> | 2009-01-07 21:50:22 +0100 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-01-07 22:48:15 +0100 |
commit | 14f0ca8eaea42a5b5a69cfcb699665dd2618db5f (patch) | |
tree | 918cdb7d3ace9c84811bc606db631a1dc68496f7 /include/linux/oprofile.h | |
parent | ebf8d974e298018f0b4ee02b1b097bf5500d3d27 (diff) | |
download | linux-14f0ca8eaea42a5b5a69cfcb699665dd2618db5f.tar.gz linux-14f0ca8eaea42a5b5a69cfcb699665dd2618db5f.tar.bz2 linux-14f0ca8eaea42a5b5a69cfcb699665dd2618db5f.zip |
oprofile: make new cpu buffer functions part of the api
This patch creates the new functions
oprofile_write_reserve()
oprofile_add_data()
oprofile_write_commit()
and makes them part of the oprofile api.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'include/linux/oprofile.h')
-rw-r--r-- | include/linux/oprofile.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 1ce9fe572e51..1d9518bc4c58 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h @@ -164,4 +164,22 @@ void oprofile_put_buff(unsigned long *buf, unsigned int start, unsigned long oprofile_get_cpu_buffer_size(void); void oprofile_cpu_buffer_inc_smpl_lost(void); +/* cpu buffer functions */ + +struct op_sample; + +struct op_entry { + struct ring_buffer_event *event; + struct op_sample *sample; + unsigned long irq_flags; + unsigned long size; + unsigned long *data; +}; + +void oprofile_write_reserve(struct op_entry *entry, + struct pt_regs * const regs, + unsigned long pc, int code, int size); +int oprofile_add_data(struct op_entry *entry, unsigned long val); +int oprofile_write_commit(struct op_entry *entry); + #endif /* OPROFILE_H */ |