summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-03-09 11:30:17 -0700
committerMathieu Chartier <mathieuc@google.com>2015-03-09 14:25:02 -0700
commit9b34b244ecddd8a35c922ed87bc3df0ca4db0282 (patch)
treecb73f09a77a1ba58331eb299bb8dd1e6eafb6eaa /runtime/runtime.cc
parent81d38f74219774d87389f83f23595ffc8fe814b1 (diff)
downloadandroid_art-9b34b244ecddd8a35c922ed87bc3df0ca4db0282.tar.gz
android_art-9b34b244ecddd8a35c922ed87bc3df0ca4db0282.tar.bz2
android_art-9b34b244ecddd8a35c922ed87bc3df0ca4db0282.zip
Trim arenas for JIT
Moved arena pool into the runtime. Added arena trimming to arena pool. When called, this madvises the used memory. Changed the JIT compiler to trim arenas after compilation. Changed the arena mmap name to dalvik-LinearAlloc. Native PSS before: 80353 kB: Native 80775 kB: Native 78116 kB: Native After: 73357 kB: Native 70181 kB: Native 70306 kB: Native Bug: 17950037 Bug: 17643507 Bug: 19264997 Change-Id: I63e7a898fd6e909c2c677fa57b5917a7b1398930
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 70de0dbf01..ac1040dfa3 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -251,6 +251,7 @@ Runtime::~Runtime() {
VLOG(jit) << "Deleting jit";
jit_.reset(nullptr);
}
+ arena_pool_.reset();
// Shutdown the fault manager if it was initialized.
fault_manager.Shutdown();
@@ -787,6 +788,7 @@ bool Runtime::Init(const RuntimeOptions& raw_options, bool ignore_unrecognized)
max_spins_before_thin_lock_inflation_ =
runtime_options.GetOrDefault(Opt::MaxSpinsBeforeThinLockInflation);
+ arena_pool_.reset(new ArenaPool);
monitor_list_ = new MonitorList;
monitor_pool_ = MonitorPool::Create();
thread_list_ = new ThreadList;