X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Foprofile%2Fcpu_buffer.h;fp=drivers%2Foprofile%2Fcpu_buffer.h;h=08706991fdd2254854b36bcfec1d6f7b36ee09dd;hb=7d468abee0f1a7e918b5e2f23120436a54ba9f33;hp=d3cc26264db55b60948a71b9f8500a236666a64d;hpb=e2ac8ef576e45d9db7264abc51383e68d26067bb;p=karo-tx-linux.git 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); void cpu_buffer_reset(struct oprofile_cpu_buffer *cpu_buf); +static inline +struct op_sample *cpu_buffer_write_entry(struct oprofile_cpu_buffer *cpu_buf) +{ + return &cpu_buf->buffer[cpu_buf->head_pos]; +} + +static inline +struct op_sample *cpu_buffer_read_entry(struct oprofile_cpu_buffer *cpu_buf) +{ + return &cpu_buf->buffer[cpu_buf->tail_pos]; +} + /* transient events for the CPU buffer -> event buffer */ #define CPU_IS_KERNEL 1 #define CPU_TRACE_BEGIN 2