False Sharing

i believe that my program which uses multpile x86 cores only may be having a “false sharing” problem. I know there is software available commercially that will help determine this and help alleviate the problem such as Threadspotter, but is there some software available as freeware or shareware that can also analyse this?

I read sommwhere that Valgrind can do this; but I do not think so. I have looked at Valgrind employing the DRD option and I see no reference to false sharing decttion .

Any other software that can do this?

Thanks in advance.

THX 1138

Sorry THX 1138, I’m not aware any tool that specifically looks for this issue. Why I use Valgrind all the time, it’s mostly to find memory issues and I’m not sure if it can find caching issues. You could probably the L2 cache miss rate to determine if there is really a problem, but I’m not sure that it would help solving the problem.

Granted, I’m not sure there is much you could do to fix it short of privatizing your variables and only using shared variables to read values with the occasional write back.

  • Mat