diff options
author | Ian Rogers <irogers@google.com> | 2013-09-05 11:01:30 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2013-09-05 11:01:30 -0700 |
commit | d133b97b1ccae88f6ee7040e288fd7a239ee4492 (patch) | |
tree | bddc00cebe8745ec7524f489063f84f5d5d7d2cd /compiler/jni | |
parent | 0e5b21018c350b5704fe1e59fe286eb342a9fa9a (diff) | |
download | art-d133b97b1ccae88f6ee7040e288fd7a239ee4492.tar.gz art-d133b97b1ccae88f6ee7040e288fd7a239ee4492.tar.bz2 art-d133b97b1ccae88f6ee7040e288fd7a239ee4492.zip |
Shard dedupe set locks.
We're seeing contention during compilation on the dedupe locks, sharding 4 ways
on an occam brings down contention by > 5x.
Improve dedupe hash function to have a FNV hash function at its heart.
Improve naming of dedupe locks.
Tidy portable JNI compiler paramters to be pointers, given that's their primary
use.
Change-Id: I95d905f2ca5fee4e83a0034926a5f6501b4aeb79
Diffstat (limited to 'compiler/jni')
-rw-r--r-- | compiler/jni/portable/jni_compiler.cc | 4 | ||||
-rw-r--r-- | compiler/jni/portable/jni_compiler.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/jni/portable/jni_compiler.cc b/compiler/jni/portable/jni_compiler.cc index 43408a7d6..0c14346ad 100644 --- a/compiler/jni/portable/jni_compiler.cc +++ b/compiler/jni/portable/jni_compiler.cc @@ -50,9 +50,9 @@ using ::art::llvm::runtime_support::JniMethodStartSynchronized; using ::art::llvm::runtime_support::RuntimeId; JniCompiler::JniCompiler(LlvmCompilationUnit* cunit, - CompilerDriver& driver, + CompilerDriver* driver, const DexCompilationUnit* dex_compilation_unit) - : cunit_(cunit), driver_(&driver), module_(cunit_->GetModule()), + : cunit_(cunit), driver_(driver), module_(cunit_->GetModule()), context_(cunit_->GetLLVMContext()), irb_(*cunit_->GetIRBuilder()), dex_compilation_unit_(dex_compilation_unit), func_(NULL), elf_func_idx_(0) { diff --git a/compiler/jni/portable/jni_compiler.h b/compiler/jni/portable/jni_compiler.h index d20c63bc1..ffabfe61c 100644 --- a/compiler/jni/portable/jni_compiler.h +++ b/compiler/jni/portable/jni_compiler.h @@ -54,7 +54,7 @@ class IRBuilder; class JniCompiler { public: JniCompiler(LlvmCompilationUnit* cunit, - CompilerDriver& driver, + CompilerDriver* driver, const DexCompilationUnit* dex_compilation_unit); CompiledMethod* Compile(); @@ -67,7 +67,7 @@ class JniCompiler { private: LlvmCompilationUnit* cunit_; - CompilerDriver* driver_; + CompilerDriver* const driver_; ::llvm::Module* module_; ::llvm::LLVMContext* context_; |