[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081216013725.33ccd1ab.akpm@linux-foundation.org>
Date: Tue, 16 Dec 2008 01:37:25 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Robert Richter <robert.richter@....com>
Cc: LKML <linux-kernel@...r.kernel.org>,
oprofile-list <oprofile-list@...ts.sourceforge.net>,
Ingo Molnar <mingo@...e.hu>,
Steven Rostedt <rostedt@...dmis.org>
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@....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..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists