Re: [PATCH] perf: detect loops processing events

2013-05-09 Thread David Ahern
On 5/9/13 7:10 PM, Namhyung Kim wrote: I think we should not truncate file_size for this case. It was decreased to data_offset + data_size in order not to read unrelated metadata (additional header feature info). But in this case, since data_size is 0 it'd have same value as data_offset, and i

Re: [PATCH] perf: detect loops processing events

2013-05-09 Thread Namhyung Kim
Hi Ingo, On Thu, 9 May 2013 11:30:25 +0200, Ingo Molnar wrote: > * Ingo Molnar wrote: >> Btw., would it make sense to emit a (once-only) warning and optimistically >> fix page_offset up to 1 (or 4096) and let things continue with the next >> set of data - can we recover most of the data in that

Re: [PATCH] perf: detect loops processing events

2013-05-09 Thread Ingo Molnar
* Ingo Molnar wrote: > > * David Ahern wrote: > > > Recovery algorithm in __perf_session__process_events attempts to remap > > a perf.data file with a different file_offset and try again at a new head > > position. Both of these adjustment rely on page_offset. If page_offset is > > 0 then fil

Re: [PATCH] perf: detect loops processing events

2013-05-09 Thread Ingo Molnar
* David Ahern wrote: > Recovery algorithm in __perf_session__process_events attempts to remap > a perf.data file with a different file_offset and try again at a new head > position. Both of these adjustment rely on page_offset. If page_offset is > 0 then file_offset and head never change which m

[PATCH] perf: detect loops processing events

2013-05-08 Thread David Ahern
Recovery algorithm in __perf_session__process_events attempts to remap a perf.data file with a different file_offset and try again at a new head position. Both of these adjustment rely on page_offset. If page_offset is 0 then file_offset and head never change which means the remap attempt is the sa