LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   What are the Tools used for Testing the performance of C and C++ programs under linux (http://www.linuxquestions.org/questions/programming-9/what-are-the-tools-used-for-testing-the-performance-of-c-and-c-programs-under-linux-683989/)

maradnus 11-17-2008 05:15 AM

What are the Tools used for Testing the performance of C and C++ programs under linux
 
Dear all,

I would like to know the Tools which are used for Testing the performance of C and C++ programs under linux?

Thanks in advance

ErV 11-17-2008 06:07 AM

gprof
also search for linux profiler.

CRC123 11-17-2008 08:23 AM

I have heard good things about gprof, but never used it.

Valgrind has a pretty good code analysis tool suite. Also, there is program that KDE makes called KCachegrind that is GUI front end for the Valgrind tool suite. I liked it a lot. I was able to pinpoint where the program was spending the most time in my code.

I think profiler's are great! It's funny how many kids in college would spend hours trying to make a section of code that took up a small part of the runtime more efficient. Meanwhile, KCachegrind allowed me to see which parts dominated actual run-time and then work on that part of the code (often inside a loop).

maradnus 11-17-2008 11:50 PM

Thank you very much.

tuxdev 11-18-2008 02:51 PM

I use the "time" command to check the total performance of the program. In particular, I like tracking what effect the optimizer has on my runtime.


All times are GMT -5. The time now is 02:45 AM.