ring_buffer: fix ring_buffer_read_page()
commit667d24125839b6f3363d8177d7ed9fab8a40e45f
authorLai Jiangshan <laijs@cn.fujitsu.com>
Mon, 9 Feb 2009 06:21:17 +0000 (9 14:21 +0800)
committerSteven Rostedt <srostedt@redhat.com>
Tue, 10 Feb 2009 14:17:37 +0000 (10 09:17 -0500)
treebe090ba5c44386556c143348b83266230ad4fb47
parentb85fa01ed958ca59523a2db3c2ee647b98745d6a
ring_buffer: fix ring_buffer_read_page()

Impact: change API and init bpage when copy

ring_buffer_read_page()/rb_remove_entries() may be called for
a partially consumed page.

Add a parameter for rb_remove_entries() and make it update
cpu_buffer->entries correctly for partially consumed pages.

ring_buffer_read_page() now returns the offset to the next event.

Init the bpage's time_stamp when return value is 0.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
kernel/trace/ring_buffer.c