This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [TAPSETS] Linux Kernel Event Trace Tool


* Frank Ch. Eigler (fche@redhat.com) wrote:
> Hi -
> 
> On Sun, Dec 18, 2005 at 12:34:34PM -0500, Mathieu Desnoyers wrote:
> 
> > [...]  If preemption is not disabled or interrupts disabled, you
> > will have issues with _stp_printf.  [...]
> 
> Looking in stp_printf for reentrancy prevention is a mistake.  The
> reentrancy treatment is supposed to be provided by the probe point
> providers: kprobes or the other entry interfacing functions.  (Not all
> of them do the right thing yet.)  The runtime functions callable from
> probes should assume atomic calls: no reentrancy, no interrupts, and
> so on.
> 
> - FChE
> 

So it leaves the locking to the probe provider. You know that it limits the set
of instrumentable kernel functions to the ones that can be protected by
disabling interrupts.

Page faults and NMI handlers are two examples where this locking scheme fails.
All traps, exceptions and fault handlers cannot then be safely instrumented, or
at the cost of doing each one a special case (for each architecture).

If someone's goal is to trace the kernel with SystemTAP probes, these
constraints could be unacceptable.

Mathieu

OpenPGP public key:              http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint:     8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]