diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2015-03-20 10:28:34 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2015-03-20 10:28:34 -0700 |
commit | 79bd2bfa8f1602067fd381834206ed6b7e73a9be (patch) | |
tree | 8f2c7da90cb6a867bac53bb0d7e180f46d55adf9 | |
parent | f5988cf0c47ff935bb19c89ed0398be5fbe44bb6 (diff) | |
download | android_art-79bd2bfa8f1602067fd381834206ed6b7e73a9be.tar.gz android_art-79bd2bfa8f1602067fd381834206ed6b7e73a9be.tar.bz2 android_art-79bd2bfa8f1602067fd381834206ed6b7e73a9be.zip |
Make it possible to enable tlab with a build parameter.
For testing.
Change-Id: I4d06a4db733b7fa09105f068028483cf88db7925
-rw-r--r-- | build/Android.common_build.mk | 4 | ||||
-rw-r--r-- | runtime/globals.h | 7 | ||||
-rw-r--r-- | runtime/runtime_options.def | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk index 08b4ec2fbc..8f00298992 100644 --- a/build/Android.common_build.mk +++ b/build/Android.common_build.mk @@ -219,6 +219,10 @@ ifeq ($(ART_USE_READ_BARRIER),true) art_cflags += -DART_USE_READ_BARRIER=1 endif +ifeq ($(ART_USE_TLAB),true) + art_cflags += -DART_USE_TLAB=1 +endif + # Cflags for non-debug ART and ART tools. art_non_debug_cflags := \ -O3 diff --git a/runtime/globals.h b/runtime/globals.h index 084547558c..ac8751c852 100644 --- a/runtime/globals.h +++ b/runtime/globals.h @@ -109,6 +109,13 @@ static constexpr bool kPoisonHeapReferences = true; static constexpr bool kPoisonHeapReferences = false; #endif +// If true, enable the tlab allocator by default. +#ifdef ART_USE_TLAB +static constexpr bool kUseTlab = true; +#else +static constexpr bool kUseTlab = false; +#endif + // Kinds of tracing clocks. enum class TraceClockSource { kThreadCpu, diff --git a/runtime/runtime_options.def b/runtime/runtime_options.def index 8775f8dbee..895ab5cdf8 100644 --- a/runtime/runtime_options.def +++ b/runtime/runtime_options.def @@ -62,7 +62,7 @@ RUNTIME_OPTIONS_KEY (Unit, DumpGCPerformanceOnShutdown) RUNTIME_OPTIONS_KEY (Unit, DumpJITInfoOnShutdown) RUNTIME_OPTIONS_KEY (Unit, IgnoreMaxFootprint) RUNTIME_OPTIONS_KEY (Unit, LowMemoryMode) -RUNTIME_OPTIONS_KEY (bool, UseTLAB, false) +RUNTIME_OPTIONS_KEY (bool, UseTLAB, kUseTlab) RUNTIME_OPTIONS_KEY (bool, EnableHSpaceCompactForOOM, true) RUNTIME_OPTIONS_KEY (bool, UseJIT, false) RUNTIME_OPTIONS_KEY (unsigned int, JITCompileThreshold, jit::Jit::kDefaultCompileThreshold) |