[PATCH v1 0/7] DCE/DSE: Add Dead Syscalls Elimination support, part1
Yuan Tan
tanyuan at tinylab.org
Sat Sep 30 02:16:27 PDT 2023
Here is a test result about DEAD_CODE_DATA_ELIMINATION (DCE) and dead syscalls
elimination (DSE). It's based on config[1] and a simple hello.c initramfs.
In the DSE test, we set CONFIG_SYSCALLS_USED="sys_write sys_exit sys_reboot,"
which is used by hello.c to simply print "Hello" then exit and shut down qemu.
| | syscall remain | vmlinux size | vmlinux after trip |
| ---------------------------------- | -------------- | ---------------- | ------------------ |
| disable DCE | 236 | 2559632 | 1963400 |
| enable DCE | 208 | 2037384 (-20.4%) | 1485776 (-24.3%) |
| enable DCE and DSE(SHE_GROUP) | 3 | 1856640 (-27.6%) | 1354424 (-31.0%) |
| enable DCE and DSE(SHE_LINK_ORDER) | 3 | 1856664 (-27.6%) | 1354424 (-31.0%) |
It shows that dead syscalls elimination can save 7% of space based on DCE.
[1]: https://pastebin.com/KG4fd7aT
More information about the linux-riscv
mailing list