jeudi 26 mai 2016

why does msdn visual studio profiler show RtlLeaveCriticalsection and RtlEnterCriticalSection as the functions doing most individual work?

I am profiling a code that uses C++11 and STL features heavily. I have many shared_ptr's and few unique_ptr's. The code is serial, however when I profile the code, RtlLeaveCriticalsection and RtlEnterCriticalsection show up as the functions doing most individual work (Exclusive sample 5% each). My thought was these internal routines invoked only for multi-threaded applications, and if there is a way to turn it off without changing the code behavior to gain performance, I would like to be able to do so.

Any suggestions or insights are appreciated Thanks

Aucun commentaire:

Enregistrer un commentaire