[TAPSETS] Linux Kernel Event Trace Tool

Guanglei Li guanglei@cn.ibm.com
Sun Dec 18 13:10:00 GMT 2005


>  Mathieu:
> Just to throw some ideas :
>
> Which protection against concurrency between multiple data sources 
> do you use
> (SMP, process vs interrupt) ?
>
> I have looked at the CVS SystemTAP code : the _stp_printk function 
> is all but
> atomic.

I didn't use protection mechanism in my tapsets.

The systemtap will use a per-cpu buffer to store the data to be 
printed. When using relayfs mode, process running on a CPU will print 
the data into the buffer related to this CPU itself. For each probe 
handler, systemtap will use atomic operations(atomic_read, atomic_inc 
etc) to avoid reentrancy.

Anyway, I think systemtap itself should handle the concurrency issue. 
Am I right?




More information about the Systemtap mailing list