Be less aggressive when inlining.
Reduce the threshold for cumulated dex registers, to prevent
long and memory expensive compiles.
bug: 62243120 (3d party app startup)
bug: 36727951 (Camera startup)
bug: 62271612 (compiler allocations)
Test: test.py
(cherry picked from commit f81621ea5a67474e6f2cb0516b606822d5843612)
Change-Id: I25b37e1226af1659934adceb9e3c9e3f12ebd4bd
(cherry picked from commit 8f51b903117e42bf5c274990ec7c74b8281582c0)
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 79f5091..4f6ca17 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -56,7 +56,7 @@
// Limit the number of dex registers that we accumulate while inlining
// to avoid creating large amount of nested environments.
-static constexpr size_t kMaximumNumberOfCumulatedDexRegisters = 64;
+static constexpr size_t kMaximumNumberOfCumulatedDexRegisters = 32;
// Limit recursive call inlining, which do not benefit from too
// much inlining compared to code locality.