Section #4. Profiling
Profiling points you to those regions of code that burn more CPU cycles. Profilers help sense the presence of code bottlenecks and come in different flavors. The OProfile kernel profiler, included with the 2.6 kernel, uses hardware assist to gather profile data. The gprof application profiler, on the other hand, relies on compiler assist to collect profiling information.
Kernel Profiling with OProfile
OProfile samples data at regular intervals using hardware performance counters supported by many processors. The performance counters can be programmed to count events such as the number of cache misses. On systems where the processor does not support performance counters, OProfile obtains limited information ...
Get Debugging Linux Systems now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.