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: Thread safety


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 ||||


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