[PATCH v3] gprof: only process line numbers for intersection of vmas and histograms
Richard Allen
rsaxvc@gmail.com
Mon Mar 10 04:08:32 GMT 2025
> Here is the v3 patch.
I'm afraid loading the symbols on-demand may add a
dependency on the order of records in the gmon file, so that
[call-graph record, histogram record] may parse differently from
[histogram record, callgraph record].
>> Also, I'm not sure if it is enough for core_create_line_syms() to check
>> only the histograms for symbols. Do you think we'll also need to lookup
>> symbols for basic-block and call-graph addresses?
> How can we get these symbols?
Idea1:
1) For bb_read_rec and cg_read_rec, split the loading apart from the
processing, and perform only the loading first, similar to hist_read_rec.
2) lookup symbols for all three record types, according to the addresses
from each record type parsed.
3) perform processing for all three record types.
Idea2:
Build an expandable cache of address->symbol mappings.
On cache miss, perform BFD lookup and insert in cache.
-Richard
More information about the Binutils
mailing list