[PATCH v4] gprof: only process line numbers for intersection of vmas and histograms
H.J. Lu
hjl.tools@gmail.com
Tue Mar 11 13:56:47 GMT 2025
On Mon, Mar 10, 2025 at 10:53 PM Richard Allen <rsaxvc@gmail.com> wrote:
>
> > I've noticed that some of my profiles have discrepancies
> > with the change to limit to histogram range parsing,
> > usually of no more than 2-3 bytes.
>
> The discrepancy occurs in line-by-line mode, when a
> low histogram bound occurs within the PC range for a line.
>
> Ex: draw_border_generic (lv_draw_sw_rect.c:1260 @ 4209fc15)
> vs draw_border_generic (lv_draw_sw_rect.c:1260 @ 4209fc17)
>
> When loading all address symbols, 4209fc15
> points to the first instruction of the line.
>
> When loading all histogram symbols,4209fc17 points to
> the first instruction sampled by the histogram, which
> happens 2B/1inst after the first instruction of the line.
>
> This isn't a problem for me. If it's a problem for anyone,
> we could reproduce the exact original printout by parsing the
> address range of all functions that intersect the histograms.
I sent the v5 patch to use histogram records only if they
come first.
--
H.J.
More information about the Binutils
mailing list