diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-24 17:28:38 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-24 17:28:38 +0000 |
commit | 579ea7d0d89a1d7f02c35ef1beb6328a37259735 (patch) | |
tree | c6f8d46af8b5e8f3e8f5f0ddaf43480fa53237d1 /compiler/optimizing/optimizing_compiler.cc | |
parent | 94ead7673f90a8199d926fe161d7d021202f0aa7 (diff) | |
download | art-579ea7d0d89a1d7f02c35ef1beb6328a37259735.tar.gz art-579ea7d0d89a1d7f02c35ef1beb6328a37259735.tar.bz2 art-579ea7d0d89a1d7f02c35ef1beb6328a37259735.zip |
Share the runtime arena for faster compile times.
Using a shared arena has the downside of getting more contentions
when requesting memory, but saves on compilation times because
we don't free the memory it allocated util the end of dex2oat.
Change-Id: I353ced1db34539850ec639b6b228451b455a48ec
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 933a8a005c..f5d65989db 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -477,8 +477,7 @@ CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_ite class_def_idx, method_idx, access_flags, compiler_driver->GetVerifiedMethod(&dex_file, method_idx)); - ArenaPool pool; - ArenaAllocator arena(&pool); + ArenaAllocator arena(Runtime::Current()->GetArenaPool()); HGraph* graph = new (&arena) HGraph( &arena, compiler_driver->GetCompilerOptions().GetDebuggable()); |