From af760f6189d8812757b34e1cb20d75639c989a05 Mon Sep 17 00:00:00 2001 From: Guilherme Ottoni Date: Mon, 23 May 2022 10:29:26 -0700 Subject: [PATCH] Retune some inlining thresholds Summary: I noticed that the JIT was inlining a lot of cold code, and missing opportunities in hotter code. This diff retunes some thresholds to reduce the inlining of colder code, and use the code-size budget to do more aggressive inling of hotter code. Reviewed By: binliu19 Differential Revision: D36547559 fbshipit-source-id: 317e5e2d7cbdefea0fd1db04543f9d03f8eccc88 --- hphp/runtime/base/runtime-option.h | 8 ++++---- hphp/test/slow/bug-30877824.php | 1 + hphp/test/slow/exceptions/66.php | 1 + hphp/test/slow/set-profile-reify-async.php.opts | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hphp/runtime/base/runtime-option.h b/hphp/runtime/base/runtime-option.h index 3ec64b937ea..8e40c66b917 100644 --- a/hphp/runtime/base/runtime-option.h +++ b/hphp/runtime/base/runtime-option.h @@ -928,11 +928,11 @@ struct RuntimeOption { F(uint32_t, HHIRInliningCostFactorMain, 100) \ F(uint32_t, HHIRInliningCostFactorCold, 32) \ F(uint32_t, HHIRInliningCostFactorFrozen, 10) \ - F(uint32_t, HHIRInliningVasmCostLimit, 10500) \ - F(uint32_t, HHIRInliningMinVasmCostLimit, 10000) \ - F(uint32_t, HHIRInliningMaxVasmCostLimit, 40000) \ + F(uint32_t, HHIRInliningVasmCostLimit, 80000) \ + F(uint32_t, HHIRInliningMinVasmCostLimit, 6500) \ + F(uint32_t, HHIRInliningMaxVasmCostLimit, 30000) \ F(uint32_t, HHIRAlwaysInlineVasmCostLimit, 4800) \ - F(uint32_t, HHIRInliningMaxDepth, 5) \ + F(uint32_t, HHIRInliningMaxDepth, 6) \ F(double, HHIRInliningVasmCallerExp, .5) \ F(double, HHIRInliningVasmCalleeExp, .5) \ F(double, HHIRInliningDepthExp, 0) \ diff --git a/hphp/test/slow/bug-30877824.php b/hphp/test/slow/bug-30877824.php index 1a6fdaf3890..47d63f05d58 100644 --- a/hphp/test/slow/bug-30877824.php +++ b/hphp/test/slow/bug-30877824.php @@ -1,6 +1,7 @@ > function g() { $ex = new Exception(); $bt = $ex->getTrace(); diff --git a/hphp/test/slow/exceptions/66.php b/hphp/test/slow/exceptions/66.php index 1a6fdaf3890..47d63f05d58 100644 --- a/hphp/test/slow/exceptions/66.php +++ b/hphp/test/slow/exceptions/66.php @@ -1,6 +1,7 @@ > function g() { $ex = new Exception(); $bt = $ex->getTrace(); diff --git a/hphp/test/slow/set-profile-reify-async.php.opts b/hphp/test/slow/set-profile-reify-async.php.opts index a5a6d49beb8..9a21ad7d16c 100644 --- a/hphp/test/slow/set-profile-reify-async.php.opts +++ b/hphp/test/slow/set-profile-reify-async.php.opts @@ -1 +1 @@ --vEval.EnableArgsInBacktraces=false +-vEval.EnableArgsInBacktraces=false -vEval.HHIREnableGenTimeInlining=false -- 2.11.4.GIT