Oprofile

A tool for profiling user and kernel level code. It uses the hardware performance counters to sample the program counter every N events.