Add -XX:+DisableExplicitGC option for Art
Phone boots. Also removed elfwriter spam from logcat.
Change-Id: I09b9d2fc40ebfeb6f1c2f12153b0ad4134bb5159
diff --git a/runtime/native/java_lang_Runtime.cc b/runtime/native/java_lang_Runtime.cc
index e380c17..55575cf 100644
--- a/runtime/native/java_lang_Runtime.cc
+++ b/runtime/native/java_lang_Runtime.cc
@@ -28,6 +28,10 @@
namespace art {
static void Runtime_gc(JNIEnv*, jclass) {
+ if (Runtime::Current()->IsExplicitGcDisabled()) {
+ LOG(INFO) << "Explicit GC skipped.";
+ return;
+ }
Runtime::Current()->GetHeap()->CollectGarbage(false);
}