-
Notifications
You must be signed in to change notification settings - Fork 2
riscv_dis_opts_batch_1
- Branch:
riscv-dis-opts-batch-1 - Tracking PR: #28 (view Pull Request and Diff)
- Mailing List:
- Not yet
- Pending: Disassembler: Implement "generic subsets" (PATCH v1 only)
It also changes the core disassembler. Note that the latest version depends on this patchset. - Pending (RFC): Disassembler: Check shift amount against XLEN (Idea 1)
It also changes the core disassembler.
- Disassembler: Use faster hash table
- Disassembler: Minor optimizations (batch 1)
- Disassembler: Cache instruction class support
- Disassembler: Use
xlenonADDIWaddress sequence
(TODO)
This benchmark is performed on:
- Ubuntu 22.04 LTS
- AMD Ryzen 5 PRO 5650G processor
In the parallel run, I ran 6 parallel jobs with -j6 (corresponding 6 cores; although the processor has 12 hardware threads, -j12 just slowed the benchmark).
On disassembling linked RISC-V ELF programs using objdump, performance improvements achieved by this project is usually about 25-32%. Isn't it nice to have?
Note that a few percent may be compensated by future non-performance changes. In fact, some performance changes for objdump -d hurts GDB performance a bit because of extra initialization (which is caused per instruction on the current GDB design).
This is relative to the latest master (commit 8e883b5e112).
| Program | Improvements | Notes |
|---|---|---|
Busybox 1.35.1 (RV64GC) |
29.0-32.8% | |
OpenSBI 1.1 (generic fw_*.elf) |
42.3-42.5% | |
Linux kernel 5.18 (vmlinux) |
27.3-29.2% | |
Linux kernel 5.18 (vmlinux.o) |
2.5-14.8% | Not finally linked |
glibc (libc.so.6) |
26.7-30.5% |
Due to extra overhead handling many debugging information and symbols, disassembling *.o will be relatively slower.
| Program | Improvements |
|---|---|
glibc (libc.a) |
6.5-7.2% |
newlib (libc.a) |
7.0-10.6% |
Due to extra archive file handling, disassembler performance improvements are not large enough.
| Program | Improvements |
|---|---|
Linux kernel 5.18 (vmlinux) |
73.3-101.1% |
Random files (/dev/urandom) |
91.9-113.9% |
| 1M (1048576) CSR instructions | 374.1% |
| Program | Improvements |
|---|---|
Linux kernel 5.18 (vmlinux) with debug info |
30.8% |
Linux kernel 5.18 (vmlinux) without debug info |
91.6% |
OpenSBI 1.1 (generic fw_*.elf) |
80.0-80.5% |
| 1M (1048576) CSR instructions (ELF) | 220.1% |
| System | N | Improvements |
|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) | 563 | 25.2% |
| Debian unstable (as of 2022-07-20) | 269 | 25.4% |
| System | N | Improvements |
|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) | 100 | 13.0% |
| Debian unstable (as of 2022-07-20) | 100 | 5.0% |
| System | N | Improvements |
|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) | 7666 | 13.4% |
| Debian unstable (as of 2022-07-20) | 946 | 6.8% |
| System | N | Improvements |
|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) | 563 | 50.0% |
| Debian unstable (as of 2022-07-20) | 269 | 42.1% |
| System | N | Improvements |
|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) | 100 | 70.5% |
| Debian unstable (as of 2022-07-20) | 100 | 50.0% |
| System | N | Improvements |
|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) | 7666 | 56.2% |
| Debian unstable (as of 2022-07-20) | 946 | 43.6% |