Tools to detect False Sharing in a C/C++ application
Asked Answered
F

3

11

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

Ferbam answered 16/8, 2011 at 14:36 Comment(2)
while not showing false sharing directly, intel vtunes can at least on certain CPUs detect sharing, but it costs money and is hard to interpret the result.Mccarthyism
Intel products have a personal use license.Obedient
T
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.

Trammell answered 24/12, 2014 at 16:18 Comment(0)
I
3

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

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

Infantile answered 16/8, 2011 at 14:42 Comment(2)
Unfortunately, DRD does not detect anything, even in the simplest cases of false sharing such the one described on en.wikipedia.org/wiki/False_sharingBarde
Actually, in the manual there is no claim that DRD is able to detect false sharingGambill
G
1

Perf("Performance Counters for Linux")

Commands:

sudo perf record -e cache-misses,anything_else_you_want ./your_program 
sudo perf report 
Glaydsglaze answered 20/4, 2015 at 22:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.