On Mon, 18 Nov 2024 12:38:37 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> A first nice advantage seems to be the smaller size of libjvm.so coming from > the lto build; lto build > > ``` > du -sh images/jdk/lib/server/libjvm.so > 22M images/jdk/lib/server/libjvm.so > ``` > > normal build > > ``` > du -sh images/jdk/lib/server/libjvm.so > 26M images/jdk/lib/server/libjvm.so > ``` > > This is in line to what TI claims here for some lto vs non-lto builds (but at > TI for aarch/arm and not for x86_64) > https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_tools_user_guide/compiler_manual/link_time_optimization/lto_benefits.html#code-size-reduction-due-to-use-of-lto When switching to size-optimization (adding `--enable-jvm-feature-opt-size=yes` to both the lto and 'normal' build) this changes to lto build du -sh images/jdk/lib/server/libjvm.so 17M images/jdk/lib/server/libjvm.so normal build du -sh images/jdk/lib/server/libjvm.so 21M images/jdk/lib/server/libjvm.so ------------- PR Comment: https://git.openjdk.org/jdk/pull/22069#issuecomment-2483031442