Messages in this thread | | | Date | Tue, 16 Dec 2008 01:37:25 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH 6/9] oprofile: port to the new ring_buffer |
| |
On Thu, 11 Dec 2008 17:42:00 +0100 Robert Richter <robert.richter@amd.com> wrote:
> -static inline > -struct op_sample *cpu_buffer_read_entry(struct oprofile_cpu_buffer *cpu_buf) > +static inline struct op_sample *cpu_buffer_read_entry(int cpu) > { > - return &cpu_buf->buffer[cpu_buf->tail_pos]; > + struct ring_buffer_event *e; > + e = ring_buffer_consume(op_ring_buffer_read, cpu, NULL); > + if (e) > + return ring_buffer_event_data(e); > + if (ring_buffer_swap_cpu(op_ring_buffer_read, > + op_ring_buffer_write, > + cpu)) > + return NULL; > + e = ring_buffer_consume(op_ring_buffer_read, cpu, NULL); > + if (e) > + return ring_buffer_event_data(e); > + return NULL; > }
This file has some really large inlined functions. cpu_buffer_read_entry() has three callsites..
| |