OSDN Git Service

Be less aggressive when inlining.
authorNicolas Geoffray <ngeoffray@google.com>
Wed, 7 Jun 2017 12:18:03 +0000 (13:18 +0100)
committerNicolas Geoffray <ngeoffray@google.com>
Wed, 7 Jun 2017 15:57:19 +0000 (16:57 +0100)
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

compiler/optimizing/inliner.cc

index 79f5091..4f6ca17 100644 (file)
@@ -56,7 +56,7 @@ static constexpr size_t kMaximumNumberOfInstructionsForSmallMethod = 3;
 
 // 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.