Reduce how often we call FindDexCache
Before host boot.oat -j4 optimizing compile:
real 1m17.792s
user 3m26.140s
sys 0m8.340s
After:
real 1m12.324s
user 3m22.718s
sys 0m8.320s
Change-Id: If18e9e79e06cdf1676692e5efacb682bf93889c3
diff --git a/compiler/driver/dex_compilation_unit.cc b/compiler/driver/dex_compilation_unit.cc
index e6c8c18..cfaa01b 100644
--- a/compiler/driver/dex_compilation_unit.cc
+++ b/compiler/driver/dex_compilation_unit.cc
@@ -18,6 +18,7 @@
#include "base/stringprintf.h"
#include "dex/compiler_ir.h"
+#include "mirror/dex_cache.h"
#include "utils.h"
namespace art {
@@ -30,7 +31,8 @@
uint16_t class_def_idx,
uint32_t method_idx,
uint32_t access_flags,
- const VerifiedMethod* verified_method)
+ const VerifiedMethod* verified_method,
+ Handle<mirror::DexCache> dex_cache)
: cu_(cu),
class_loader_(class_loader),
class_linker_(class_linker),
@@ -39,7 +41,8 @@
class_def_idx_(class_def_idx),
dex_method_idx_(method_idx),
access_flags_(access_flags),
- verified_method_(verified_method) {
+ verified_method_(verified_method),
+ dex_cache_(dex_cache) {
}
const std::string& DexCompilationUnit::GetSymbol() {