문제

We're developing a multithreaded project. My colleague said that gprof works perfectly with no work around with multithreaded programs. I read otherwise some time ago.

http://sam.zoy.org/writings/programming/gprof.html

http://lists.gnu.org/archive/html/bug-binutils/2010-05/msg00029.html

I also read this:

How to profile multi-threaded C++ application on Linux?

So I'm guessing the workaround is no longer needed? If so, since when is it not needed?

도움이 되었습니까?

해결책

Unless you change the processing the gprof would work fine.

Changing the processing means using co-processor or gpus as computing units. In the worst case you have to manually call the setitimer function for every thread. But as per latest version, (2013-14) it's not needed.

In certain cases it behaves mischievously. So I advice to use the VTUNE from Intel which would give more accurate and more detailed information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top