gprof is very slow (>100x worse than "before")
Ian Lance Taylor
ian@zembu.com
Mon Jul 9 12:48:00 GMT 2001
Kevin Nomura <nomura@netapp.com> writes:
> I coded a workaround which was to precompute a mapping from address
> to source line, and hook get_src_info to binary-search this mapping.
> Then "gprof --line" takes less than 5 minutes. This is still doing
> a lookup for each byte of the binary as above, so it seems that
> the generic BFD routine is far too expensive for the brute-force
> loop. Certainly core_create_line_syms can be smarter too. But
> I don't know the rules of the game with BFD -- what symbol info
> is exported, what new interfaces are reasonable to add -- these
> rules might steer the fix in a certain direction.
gprof for ELF/stabs was sped up quite a bit by some improvements to
_bfd_stab_section_find_nearest_line. Perhaps similar improvements
could be applied to NAME(aout,find_nearest_line). Perhaps that is
what you have already done.
Ian
More information about the Binutils
mailing list