aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/cpu_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oprofile/cpu_buffer.h')
-rw-r--r--drivers/oprofile/cpu_buffer.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h
index d3cc26264db5..08706991fdd2 100644
--- a/drivers/oprofile/cpu_buffer.h
+++ b/drivers/oprofile/cpu_buffer.h
@@ -52,6 +52,18 @@ DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer);
52 52
53void cpu_buffer_reset(struct oprofile_cpu_buffer *cpu_buf); 53void cpu_buffer_reset(struct oprofile_cpu_buffer *cpu_buf);
54 54
55static inline
56struct op_sample *cpu_buffer_write_entry(struct oprofile_cpu_buffer *cpu_buf)
57{
58 return &cpu_buf->buffer[cpu_buf->head_pos];
59}
60
61static inline
62struct op_sample *cpu_buffer_read_entry(struct oprofile_cpu_buffer *cpu_buf)
63{
64 return &cpu_buf->buffer[cpu_buf->tail_pos];
65}
66
55/* transient events for the CPU buffer -> event buffer */ 67/* transient events for the CPU buffer -> event buffer */
56#define CPU_IS_KERNEL 1 68#define CPU_IS_KERNEL 1
57#define CPU_TRACE_BEGIN 2 69#define CPU_TRACE_BEGIN 2