diff options
author | Patrick O'Neill <patrick@rivosinc.com> | 2023-11-29 19:55:20 -0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2023-11-30 15:52:30 +0800 |
commit | 460e0e6e3e6c23ed5f4b70e1b86435f58cb890aa (patch) | |
tree | 2c91b02a06b1e5b9d9d09159b2afe6b49f4482e6 /gdb/sparc-tdep.c | |
parent | dd2947e76aa285a12aa26de63a59f5fb8092ef82 (diff) | |
download | binutils-460e0e6e3e6c23ed5f4b70e1b86435f58cb890aa.zip binutils-460e0e6e3e6c23ed5f4b70e1b86435f58cb890aa.tar.gz binutils-460e0e6e3e6c23ed5f4b70e1b86435f58cb890aa.tar.bz2 |
RISC-V: Avoid updating state until symbol is found
Currently objdump gets and updates the map state once per symbol. Updating the
state (partiularly riscv_parse_subset) is expensive and grows quadratically
since we iterate over all symbols. By deferring this until once we've found the
symbol of interest, we can reduce the time to dump a 4k insn file of .norvc and
.rvc insns from ~47 seconds to ~0.13 seconds.
opcodes/ChangeLog:
* riscv-dis.c (riscv_get_map_state): Remove state updating logic
and rename to riscv_is_valid_mapping_symbol.
(riscv_update_map_state): Add state updating logic to seperate function.
(riscv_search_mapping_symbol): Use new riscv_update_map_state.
(riscv_data_length): Ditto.
Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
Diffstat (limited to 'gdb/sparc-tdep.c')
0 files changed, 0 insertions, 0 deletions