]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix ommitted mmap data update on remap
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 23 May 2011 11:06:28 +0000 (13:06 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 23 May 2011 11:22:57 +0000 (13:22 +0200)
commit2e2dd8459230b737520bbdda5ea614f6232c5876
treec269208d64edc1a535382601a8904e0eb96a1fcc
parent104c3a698563a6f245644e9340199b760f814691
perf tools: Fix ommitted mmap data update on remap

Commit 6fdfd5bea06 "perf tools: Check we are able to read the event
size on mmap" brought a check to ensure we can read the size of the
event before dereferencing it, and do a remap otherwise to move the
buffer forward.

However that remap was ommitting all the necessary work to
update the new page offset, head, and to unmap previous pages,
etc...

To fix this, gather all the code that fetches the event in a
seperate helper which does all the necessary checks about the
header/event size and tells us anytime a remap is needed.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1306148788-6179-3-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/session.c