I am setting up a high-performance multi-threaded application, and I suspect that a false exchange may be the reason why performance is poor. How can I verify that this is so?
I am running C ++ on Ubuntu 12.04 using gcc 4.82.
I will post something that I just came across with C ++ Concurrency in action.
One way to check for a false exchange is to add huge blocks of indentation between data items that can be accessed by different threads at the same time.
struct protected_data { std::mutex m; char padding[65536]; my_data data_to_protect; };
, , .
, , " , X ?" " Y ", : , .
, , . , (CODEXL AMD VTune Pro Intel), , .
.
https://fooobar.com/questions/1560405/index.html
https://fooobar.com/questions/1560406/index.html