[Cbe-oss-dev] [PATCH 2/8] spufs: Trace spufs_stop_callback events
Julio M. Merino Vidal
jmerino at ac.upc.edu
Wed Apr 30 15:50:28 EST 2008
On Apr 30, 2008, at 7:09 , Jeremy Kerr wrote:
> Hi Julio,
>
>> The spuevent module contained a trace entry for spufs_stop_callback,
Remember to replace spuevent with sputrace here if this gets applied.
>> but this marker was not placed anywhere. Fix this by adding a marker
>> to the routine and avoid using the marker because we cannot grab the
>> trace lock in interrupt context.
>
> I'd prefer not to add an unused marker here. How is this useful to
> you?
I am using the stop callback marker to quantify the time it takes
from the reception of the SPU's stop interrupt to the wake up (well,
start of execution) of its corresponding PPU control thread. I'm not
doing this with sputrace because of the problem I mentioned in the
code; but with SystemTap I can hook to that marker just fine, and log
a trace entry easily.
The reason I added the XXX comment in sputrace.c (instead of just
removing it from there) is that, if this module is ever adjusted to
not require a lock to log events, it will be possible to hook into
sputfs_stop_callback. At the moment, having the note there (and the
marker name also) ensures "consistency": sputrace.c holds the full
list of available markers for spufs and nobody else will make the
mistake of trying to capture spufs_stop_callback from sputrace
(getting a hard system freeze as happened to me).
Thanks for looking at this.
More information about the cbe-oss-dev
mailing list