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


So how about using semaphore in probe handler or spin lock in
_stp_sprintf. So that no event will be lost.

Whom would such a spinlock protect against? There is intended to be
no locking that synchronizes separate CPUs running probes, except when
these scripts access shared ("global"-declared) systemtap variables.
- FChE

protect against _stp_pbuf[cpu] & _stp_pbuf_len[cpu]. But as you mentioned, it may not be so easy for systemtap.



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.

Why do you think so? Reentrancy is assessed on a per-cpu basis. Concurrency across CPUs is not explicitly blocked, except as above. - FChE
sorry, I missed the following statement:
struct context* c = per_cpu_ptr (contexts, smp_processor_id());
so the context is a per cpu variable.




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