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
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 933a8a0..f5d6598 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -477,8 +477,7 @@
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());