Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tools to detect False Sharing in a C/C++ application

Are there any tools that detect and report False Sharing for applications written in C or C++?

like image 886
MetallicPriest Avatar asked Aug 16 '11 14:08

MetallicPriest


2 Answers

Try Sheriff and Predator. Sheriff is at https://github.com/plasma-umass/sheriff, while Predator is at https://github.com/plasma-umass/Predator. Predator is a compiler-based approach that you have to recompile your program using a new LLVM compiler. It is the most exhaustive detection tool up to now. Sheriff is library but it can only detect false sharing if you are using pthreads library.

like image 170
tongping Avatar answered Oct 16 '22 09:10

tongping


Try the DRD (data race detection) module of valgrind.

From the manual it looks like it can be used to detect False sharing.

like image 39
Karoly Horvath Avatar answered Oct 16 '22 09:10

Karoly Horvath