I am supposed to profile/optimize an application. I am running on a mips machine so valgrind is not an option. Any tool suggestions, tactics?
EDIT: I guess I should have given more details. Gprof is not supported in my toolchain. I have tried oprofile; but results seemed incorrect, also I cou开发者_开发知识库ld not get a calltree. I am looking for an alternative.
If you're using the GNU toolchain (gcc et al) then you can use gprof
. It's crude, but it works.
If your OS is Linux then you might also check whether oprofile
is supported on MIPS.
The method I've relied on for three decades, for all such problems, on all kinds of machines and operating systems, is this.
gprof is nearly as old and reliable, but is very limited in what it will do for you.
The SD Profiler is a family of code profilers based on langauge-accurate parsers used to temporarily instrument your code. These profilers cover C, C++, Java, C#, PHP and COBOL.
The profilers have very low footprint and overhead, and are thus ideal for embedded systems. You didn't say what langauge, so I'll guess you are interested in C or C++.
However, you need to be more specific about which (C/C++) dialect you are using.
精彩评论