OSDN Git Service

Fix method_verifier_test with the SS collector.
authorHiroshi Yamauchi <yamauchi@google.com>
Wed, 25 Feb 2015 20:52:34 +0000 (12:52 -0800)
committerHiroshi Yamauchi <yamauchi@google.com>
Thu, 26 Feb 2015 01:39:52 +0000 (17:39 -0800)
Rename art_default_gc_type to ART_DEFAULT_GC_TYPE.

Bug: 19514492

Change-Id: I3c7920e7a84327c5908462e51e21199b89fb187d

build/Android.common_build.mk
runtime/verifier/reg_type_cache.cc

index cb34473..6a83e72 100644 (file)
@@ -74,8 +74,8 @@ endif
 #
 # Used to change the default GC. Valid values are CMS, SS, GSS. The default is CMS.
 #
-art_default_gc_type ?= CMS
-art_default_gc_type_cflags := -DART_DEFAULT_GC_TYPE_IS_$(art_default_gc_type)
+ART_DEFAULT_GC_TYPE ?= CMS
+art_default_gc_type_cflags := -DART_DEFAULT_GC_TYPE_IS_$(ART_DEFAULT_GC_TYPE)
 
 ART_HOST_CFLAGS :=
 ART_TARGET_CFLAGS :=
index 1dfbe51..c248565 100644 (file)
@@ -580,8 +580,9 @@ void RegTypeCache::VisitStaticRoots(RootCallback* callback, void* arg) {
 }
 
 void RegTypeCache::VisitRoots(RootCallback* callback, void* arg) {
-  for (const RegType* entry : entries_) {
-    entry->VisitRoots(callback, arg);
+  // Exclude the static roots that are visited by VisitStaticRoots().
+  for (size_t i = primitive_count_; i < entries_.size(); ++i) {
+    entries_[i]->VisitRoots(callback, arg);
   }
 }