[TAPSETS] Linux Kernel Event Trace Tool
Guanglei Li
guanglei@cn.ibm.com
Tue Dec 20 14:38:00 GMT 2005
>> 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.
More information about the Systemtap
mailing list