Available Profilers
Prev
Next

Chapter 3. Available Profilers

The most widely available profiler on Unix platforms is gprof, the GNU profiler. A respectable and long-available tool, gprof may not be enough for you if your are trying to do very fine tuning of a complex program with lots of small routines. This is because the time measurements given by gprof are statistical, which means that it only gives you a sampling of the time spent in the various parts of your programs, not a real and accurate view, especially if your program runs for a very short period of time.

A new profiler recently appeared on Linux. It is called Function Check (currently only version 1.4 is supported) and is available here. This profiler brings numerous improvement over its ancestor. Instead of producing statistical results, it generates real measurements of the time spent in routines. For that matter, it uses a technic known as function instrumentation. Briefly, you compile your code with a special switch (specific to GCC, so you'll have to use gcc 2.95 or later) which adds calls to the profiler on entry and exit of every function. Then at link time, you link with the Function Check library. After executing your application, a file named fnccheck.out is produced and contains the profiling results.

Finally, KProf supports profiling for Palm OS applications executed in POSE, the Palm OS Emulator. If you use Unix to develop applications for Palm OS, you can take advantage of KProf to examine profiling results generated by POSE.

Links:

Prev
Next
Home