[PATCH 1/6] gprof: remove ASCII formfeed/0x0C bytes from source code
Richard Allen
rsaxvc@gmail.com
Sat Apr 5 22:07:51 GMT 2025
[Richard]
>> However, while reviewing them I noticed that patch #6 might cause symbols
>> to be loaded repeatedly in the case where the gmon.out contains multiple
>> histograms of the same region.
[Alan]
> Actually, I'm reasonably happy to push that one too, with possibly a
> later incremental change to merge histogram ranges before calculating
> line numbers.
I looked into this concern, and it isn't a problem because all gmon
histograms with
the same address range are coalesced into a single gprof histogram during gmon
loading before the histograms array is iterated to create the line symbols.
I also noticed that if we knew the symbol length, core_create_function_syms()
could get the same treatment. but it's often only about a 2-5x speedup
on files here,
and I think we only know the symbol length for ELF files, so I don't think it's
worth working through. I mention it in case anyone else is using ELF files with
many more symbols than mine.
-Richard
More information about the Binutils
mailing list