[PATCH v1 0/7] DCE/DSE: Add Dead Syscalls Elimination support, part1
Yuan Tan
tanyuan at tinylab.org
Sat Sep 30 02:31:32 PDT 2023
I don't know why linux-kernel at vger.kernel.org reject my email send out by
thunderbird. So here I am resending this mail with git send-email.
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 strip |
| ---------------------------------- | -------------- | ---------------- | ------------------- |
| 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