From: Frederic Weisbecker Date: Mon, 23 May 2011 11:06:28 +0000 (+0200) Subject: perf tools: Fix ommitted mmap data update on remap X-Git-Tag: v3.0-rc1~343^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=998bedc8c56c6869de457c845cbd328592e5e82e;p=pandora-kernel.git perf tools: Fix ommitted mmap data update on remap Commit eac9eacee16 "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 Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1306148788-6179-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed