From: John L. <le...@mo...> - 2009-06-09 20:04:38
|
On Tue, Jun 09, 2009 at 09:46:16PM +0200, Robert Richter wrote: > > > In sync_buffer() the data is copied to the event buffer. Since the > > > buffer state is reset at buffer boundaries (when no buffer data is > > > available), there could be corrupt data too. > > > > I'm not clear on the problem, could you explain it further? As the CPU > > buffer is a ring buffer, when reading, it's not possible for anything > > else to be writing to those buffer slots. > > Assuming a backtrace of a sequence is not yet written completely and > the variable 'available' points in the middle of it, next time available is just a count of the slots ready to read from the CPU buffer. It doesn't point anywhere. Do you mean tail_pos? Yes, this looks like a problem. buffer_sync() is starting off in a kernel context. It shouldn't be calling add_sample() until we've had a clear indication of kernel mode or we get an mm to use. Good spot. regards john |