OpenJDK / jdk / jdk
changeset 54646:5b1eec609909
8220388: Increase -inlinehint-threshold for Clang to avoid G1 pause time regression
Summary: Make Clang inline more aggressively for functions with inline keyword
Reviewed-by: erikj, jiangli, shade
author | manc |
---|---|
date | Fri, 08 Mar 2019 18:21:52 -0800 |
parents | 05aaccf7d558 |
children | c0d9bc9b4e1f |
files | make/autoconf/flags-cflags.m4 |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/make/autoconf/flags-cflags.m4 Mon Apr 29 16:01:52 2019 -0400 +++ b/make/autoconf/flags-cflags.m4 Fri Mar 08 18:21:52 2019 -0800 @@ -536,6 +536,12 @@ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16" if test "x$OPENJDK_TARGET_OS" = xlinux; then + if test "x$DEBUG_LEVEL" = xrelease; then + # Clang does not inline as much as GCC does for functions with "inline" keyword by default. + # This causes noticeable slowdown in pause time for G1, and possibly in other areas. + # Increasing the inline hint threshold avoids the slowdown for Clang-built JVM. + TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -mllvm -inlinehint-threshold=100000" + fi TOOLCHAIN_CFLAGS_JDK="-pipe" TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX fi