C profiler tool like in matlab?
I was wondering is there's a profiler tool, that can benchmark a C program and give info like execution time, divided between function, resource consumtion ect. I've done a lot of programming in Matlab, and the profiler tool there is very helpfull, to see which areas of your program isn't very effective.
jnusa |
Have a look at Valgrind its a memory debugger and profiler.
|
Hmm... looks very usefull. Gave me a lot of thinks I need to correct :). Doesn't seem to be able to benchmark your program though?!
|
Profiling is included in any "respectable" compiler. In C, compile your program with the -p option, and then, after executing your program, use "prof" to see the profile.
If you're using gcc, use the -pg option and "gprof". and have a look at the man page of gprof. |
Try GProf Also there is KCachegrind which is based on Valgrind but does more and has a good interface.
|
Uhhh.... thank you so much leonscape. kCachegrind is pretty awesome... just what I needed. For future reference.... needs to install valgrind, valgrind-callgrind and kcachegrind to make it work.
[EDIT] missed your post bahramH. Sounds great.. I'll try to add those compiler options- [/EDIT] |
All times are GMT -5. The time now is 05:14 PM. |