]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gprof: fix odd inst len hist scale calculation
authorRichard Allen <rsaxvc@gmail.com>
Sun, 9 Feb 2025 16:49:01 +0000 (10:49 -0600)
committerAlan Modra <amodra@gmail.com>
Sun, 9 Feb 2025 22:28:02 +0000 (08:58 +1030)
commit2effb0d11fd184e432dbce2cd6e45240471c1189
treee2400377bfa972801a863f6f9f395a4f04c4404b
parentcb0930a0005f2e4229a0ad253236b432ba95524f
gprof: fix odd inst len hist scale calculation

With even instruction sizes, this rounding never truncated.
Xtensa CPUs mostly use 2-3 byte instructions, and this can lead
to a histogram being captured with an odd length address range.

This small truncation prevented gprof from parsing gmon.out files
containing multiple histograms when at least one of them has an
odd address range length and another has any other address range.

Signed-off-by: Richard Allen <rsaxvc@gmail.com>
gprof/hist.c