This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Thread safety
- From: Mandar Gurav <mandarwce at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Wed, 2 Feb 2011 19:43:40 +0530
- Subject: Re: Thread safety
- References: <AANLkTi=QZcCzvfh7rKOODPXc2H9pi4xOM5BF+0eOcTQj@mail.gmail.com>
Hi all,
I have created a counter (global variable in stp file) in my stp
file. I want to increment each time when some conditions are met.
I want know that, whether this particular global variable must be
protected form concurrent accesses by different instances of the same
events???
Let us take an example of cache miss. If on a multicore machine two or
more cache miss on different cores can happen simultaneously. If I am
counting those cache misses then probe functions may simultaneously
access the same variable (worst case is when they try to modify the
same variable).
So I wanted know, whether the events/ Probes are processed in
sequential manner or by different threads simultaneously.
--
|||| Mandar Gurav ||||