|
From: Dennis L. <pla...@in...> - 2005-03-11 09:07:24
|
Hi, I have a question to how valgrind behaves when running a multithreaded program on a smp machine. I recently discovered a subtle error in our program that only showed up once in a while but very often on smp machines. The reason was that on the smp machines two threads were really run parallel and non-thread-safe parts of the program could interfere directly, while when run on a uniprocessor threads were run one after each other, reducing the possibility of the bug appearing. Now the question, how does valgrind do the scheduling here ? Where can context switches happen, only at the boundaries of basic blocks ? Or anywhere ? greets Dennis Carpe quod tibi datum est |
|
From: Tom H. <to...@co...> - 2005-03-11 09:16:11
|
In message <6.1...@po...>
Dennis Lubert <pla...@in...> wrote:
> Now the question, how does valgrind do the scheduling here ? Where can
> context switches happen, only at the boundaries of basic blocks ? Or
> anywhere ?
They will only occur at basic block boundaries I believe. There will
also only ever be one thread running at a time even on an SMP machine.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|