Add ART_TEST_DEBUG_GC to help with debugging gc.

ART_TEST_DEBUG_GC is meant to be used to easily set the GC
configuration to the one that currently needs debugging in a
continuous test.

Bug: 19894268
Change-Id: I566e44360fc4cd47b3448e194cc8c16c9f498b7f
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index 83dd690..5d4feb8 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -60,6 +60,11 @@
 $(info Enabling ART_BUILD_HOST_STATIC)
 endif
 
+ifeq ($(ART_TEST_DEBUG_GC),true)
+  ART_DEFAULT_GC_TYPE := SS
+  ART_USE_TLAB := true
+endif
+
 #
 # Used to enable JIT
 #
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index ee6c2ef..13428ec 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -46,6 +46,10 @@
     $(JILL_JAR)
 endif
 
+ifeq ($(ART_TEST_DEBUG_GC),true)
+  ART_TEST_WITH_STRACE := true
+endif
+
 # Helper to create individual build targets for tests. Must be called with $(eval).
 # $(1): the test number
 define define-build-art-run-test