On 11/12/13, 8:34 AM, Peter Zijlstra wrote: > On Tue, Nov 12, 2013 at 08:25:02AM -0700, David Ahern wrote: >> The patch in this thread deletes the file. Another option is to rewind the >> file to the last known good write (ie., length after last successful call to >> write_output). > > I'd report a warning and continue with all events that you could read > upto that point. > Coming back to this: the answer to that statement is known. The attached patch attempt to rewind to the last good write. Subsequent reads to the file fail with: WARNING: The /tmp/mnt/perf.data file's data size field is 0 which is unexpected. Was the 'perf record' command properly terminated? reading input file (size expected=3 received=-1)broken or missing trace data incompatible file format (rerun with -v to learn more) Given that it would seem deleting the file is the best option. David