summaryrefslogtreecommitdiff
path: root/compiler/driver/dex_compilation_unit.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-09-02 14:54:11 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-09-03 13:27:19 -0700
commit736b560f2d2c89b63dc895888c671b5519afa4c8 (patch)
treed5aee7ac36f458a5f6e6d75fceb19f8963a71db5 /compiler/driver/dex_compilation_unit.h
parentfe3879e6011f629d0dd6b04fab00b9496bd4ea08 (diff)
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
Diffstat (limited to 'compiler/driver/dex_compilation_unit.h')
-rw-r--r--compiler/driver/dex_compilation_unit.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/compiler/driver/dex_compilation_unit.h b/compiler/driver/dex_compilation_unit.h
index 398300699e..16872f41f3 100644
--- a/compiler/driver/dex_compilation_unit.h
+++ b/compiler/driver/dex_compilation_unit.h
@@ -19,9 +19,10 @@
#include <stdint.h>
+#include "base/arena_object.h"
#include "dex_file.h"
+#include "handle.h"
#include "jni.h"
-#include "base/arena_object.h"
namespace art {
namespace mirror {
@@ -36,10 +37,16 @@ class DexCompilationUnit : public DeletableArenaObject<kArenaAllocMisc> {
public:
explicit DexCompilationUnit(CompilationUnit* cu);
- DexCompilationUnit(CompilationUnit* cu, jobject class_loader, ClassLinker* class_linker,
- const DexFile& dex_file, const DexFile::CodeItem* code_item,
- uint16_t class_def_idx, uint32_t method_idx, uint32_t access_flags,
- const VerifiedMethod* verified_method);
+ DexCompilationUnit(CompilationUnit* cu,
+ jobject class_loader,
+ ClassLinker* class_linker,
+ const DexFile& dex_file,
+ const DexFile::CodeItem* code_item,
+ uint16_t class_def_idx,
+ uint32_t method_idx,
+ uint32_t access_flags,
+ const VerifiedMethod* verified_method,
+ Handle<mirror::DexCache> dex_cache);
CompilationUnit* GetCompilationUnit() const {
return cu_;
@@ -109,6 +116,10 @@ class DexCompilationUnit : public DeletableArenaObject<kArenaAllocMisc> {
const std::string& GetSymbol();
+ Handle<mirror::DexCache> GetDexCache() const {
+ return dex_cache_;
+ }
+
private:
CompilationUnit* const cu_;
@@ -124,6 +135,8 @@ class DexCompilationUnit : public DeletableArenaObject<kArenaAllocMisc> {
const uint32_t access_flags_;
const VerifiedMethod* verified_method_;
+ Handle<mirror::DexCache> dex_cache_;
+
std::string symbol_;
};