diff options
author | Richard Allen <rsaxvc@gmail.com> | 2025-02-16 16:50:02 -0600 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-03-01 11:17:13 +1030 |
commit | b6539282a9378cc2587b480c3fc5c75adabf6301 (patch) | |
tree | 4fe048eb3e530272a2760094ca5ab4464761aae5 | |
parent | f19534f257eb2643624414c22aa5a32da39d7b66 (diff) | |
download | binutils-b6539282a9378cc2587b480c3fc5c75adabf6301.zip binutils-b6539282a9378cc2587b480c3fc5c75adabf6301.tar.gz binutils-b6539282a9378cc2587b480c3fc5c75adabf6301.tar.bz2 |
gprof: speed up line-by-line for MIPS/PowerPC/RISCV/SuperH
Roughly halves the number of bfd_find_nearest_line() calls,
about 40% less time for a few different large ELF files.
Signed-off-by: Richard Allen <rsaxvc@gmail.com>
-rw-r--r-- | gprof/corefile.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gprof/corefile.c b/gprof/corefile.c index bd8e60d..6ecb55d 100644 --- a/gprof/corefile.c +++ b/gprof/corefile.c @@ -255,6 +255,13 @@ core_init (const char * aout_name) offset_to_code = 2; break; + case bfd_arch_mips:/* and microMIPS */ + case bfd_arch_powerpc:/* and VLE */ + case bfd_arch_riscv:/* and RVC */ + case bfd_arch_sh: + insn_boundary = 2; + break; + case bfd_arch_alpha: insn_boundary = 4; break; |