On 09.06.09 18:47:25, John Levon wrote:
> On Tue, Jun 09, 2009 at 10:17:05PM +0200, Robert Richter wrote:
>
> > > 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.
> >
> > In sb_buffer_start state all samples are ignored. add_sample() is only
> > called for states b_bt_start and b_sample_start.
>
> Misread the code. I don't think there's a bug here then - nothing can
> move us into a state where we log samples without moving into a suitable
> context first.
Right, the above should work.
Again, I am not sure if backtraces are safe. If the number of
available entries does not match with the and of a backtrace, then the
remaining backtrace will be interpreted as samples. (Though this
should not happen, since the cpu buffer is written atomically in the
interrupt handler.)
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@...
|