10

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

Massimiliano
  • 16,770
  • 10
  • 69
  • 112
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356

3 Answers3

4

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.

tongping
  • 56
  • 1
3

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

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

Karoly Horvath
  • 94,607
  • 11
  • 117
  • 176
  • 3
    Unfortunately, DRD does not detect anything, even in the simplest cases of false sharing such the one described on http://en.wikipedia.org/wiki/False_sharing – gui11aume Feb 23 '14 at 15:01
  • 2
    Actually, in the manual there is no claim that DRD is able to detect false sharing – Paolo M Nov 26 '15 at 15:32
1

Perf("Performance Counters for Linux")

Commands:

sudo perf record -e cache-misses,anything_else_you_want ./your_program 
sudo perf report