From b3f7fcdbc2b7713b590a04c55fb9515d7764754a Mon Sep 17 00:00:00 2001 From: Younes Manton Date: Thu, 4 Sep 2025 20:52:49 -0700 Subject: [PATCH 1/2] Enable fan-in inlining heuristics at high opt Signed-off-by: Younes Manton --- runtime/compiler/optimizer/InlinerTempForJ9.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/compiler/optimizer/InlinerTempForJ9.cpp b/runtime/compiler/optimizer/InlinerTempForJ9.cpp index d301ce7f4a7..5d098a21fc1 100644 --- a/runtime/compiler/optimizer/InlinerTempForJ9.cpp +++ b/runtime/compiler/optimizer/InlinerTempForJ9.cpp @@ -2971,7 +2971,8 @@ TR_J9InlinerPolicy::adjustFanInSizeInWeighCallSite(int32_t& weight, INLINE_fanInCallGraphFactor is an integer number divided by 100. This allows us to avoid using float numbers for specifying the factor. */ - if (comp()->getMethodHotness() > warm) + static bool disableFanInAtHighOpt = feGetEnv("TR_disableFanInAtHighOpt") != NULL; + if (disableFanInAtHighOpt && comp()->getMethodHotness() > warm) return; uint32_t thresholdSize = (!comp()->getOption(TR_InlinerFanInUseCalculatedSize)) ? getJ9InitialBytecodeSize(callee, 0, comp()) : size; From 9a53761e97de0a9a78134853173a7c53ef949c2e Mon Sep 17 00:00:00 2001 From: Younes Manton Date: Mon, 27 Oct 2025 07:04:35 -0700 Subject: [PATCH 2/2] Reduce fan-in min bytecode size threshold Allow smaller methods to be considered. Signed-off-by: Younes Manton --- runtime/compiler/control/J9Options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/compiler/control/J9Options.cpp b/runtime/compiler/control/J9Options.cpp index 73e79a3ffa0..afe27faf4d3 100644 --- a/runtime/compiler/control/J9Options.cpp +++ b/runtime/compiler/control/J9Options.cpp @@ -196,7 +196,7 @@ int32_t J9::Options::_maxIprofilingCount = TR_DEFAULT_INITIAL_COUNT; // 3000 int32_t J9::Options::_maxIprofilingCountInStartupMode = TR_QUICKSTART_INITIAL_COUNT; // 1000 int32_t J9::Options::_iprofilerFailRateThreshold = 70; // percent 1-100 int32_t J9::Options::_iprofilerFailHistorySize = 10; // percent 1-100 -int32_t J9::Options::_iprofilerFaninMethodMinSize = 50; // bytecodes +int32_t J9::Options::_iprofilerFaninMethodMinSize = 30; // bytecodes int32_t J9::Options::_compYieldStatsThreshold = 1000; // usec int32_t J9::Options::_compYieldStatsHeartbeatPeriod = 0; // ms