gprof: only process line numbers for intersection of vmas and histograms

Some programs like RTOS firmware may have a large number of symbols.

By loading the histograms before loading symbols, we can look up
only the line numbers that were captured in the histogram file,
which reduces processing time for such a firmware from ~2 minutes
to ~2 seconds.

Signed-off-by: Richard Allen <rsaxvc@gmail.com>
2 files changed