This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gprof is very slow (>100x worse than "before")


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]