3

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?

Community
  • 1
  • 1
AturSams
  • 7,568
  • 18
  • 64
  • 98

1 Answers1

1

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.

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61
Abhijatya Singh
  • 642
  • 6
  • 23