This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [TAPSETS] Linux Kernel Event Trace Tool
* Guanglei Li (guanglei@cn.ibm.com) wrote:
> >If the person is interested into tracing the whole system (process
> >events,
> >softirqs, interrupts and NMI) to see the root of a problem, then a
> >"event lost"
> >will happen as soon as an NMI tries to reenter into the logging
> >code. That will
> >leave an incomplete trace.
> >
> > Mathieu Desnoyers <compudj@krystal.dyndns.org>
>
> >FChE
> >Not exactly. Those functions could still in theory be instrumented,
> >but an actual run-time reentry into the probing system would be
> >detected, the probe short-circuited, and a "missed probe" would be
> >recorded.
>
> So how about using semaphore in probe handler or spin lock in
> _stp_sprintf. So that no event will be lost. The current
> implementation will just abandon the processing of a probe handler if
> there's already another probe handler running, even on a different
> CPU.
>
Semaphore and spin locks needs to explicitely disable interrupts to insure
no deadlock occurs when a resource is shared with interrupt handlers.
NMIs, by nature, cannot be disabled.
Mathieu
OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68