diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-03-09 11:30:17 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-03-09 14:25:02 -0700 |
commit | 9b34b244ecddd8a35c922ed87bc3df0ca4db0282 (patch) | |
tree | cb73f09a77a1ba58331eb299bb8dd1e6eafb6eaa /runtime/runtime.h | |
parent | 81d38f74219774d87389f83f23595ffc8fe814b1 (diff) | |
download | android_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.h')
-rw-r--r-- | runtime/runtime.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index 5078b7f1d6..4cddb5c255 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -28,6 +28,7 @@ #include "arch/instruction_set.h" #include "base/allocator.h" +#include "base/arena_allocator.h" #include "base/macros.h" #include "compiler_callbacks.h" #include "gc_root.h" @@ -545,6 +546,13 @@ class Runtime { void CreateJit(); + ArenaPool* GetArenaPool() { + return arena_pool_.get(); + } + const ArenaPool* GetArenaPool() const { + return arena_pool_.get(); + } + private: static void InitPlatformSignalHandlers(); @@ -608,6 +616,8 @@ class Runtime { gc::Heap* heap_; + std::unique_ptr<ArenaPool> arena_pool_; + // The number of spins that are done before thread suspension is used to forcibly inflate. size_t max_spins_before_thin_lock_inflation_; MonitorList* monitor_list_; |