Fix a comment that misrepresents the root marking algorithm.

During the initial root marking nothing is pushed on the mark stack.
Marked roots are pushed during the scanning phase following root
marking.  Unfortunately, the comment above the root marking callback
incorrectly claimed that it pushed objects on the mark stack.

In addition, this change renames the marking callback for the re-mark
phase to more accurately reflect its limited usage.

Change-Id: I38161fa723e00e14bd8d047a2e25cdbfd215a2c6
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index c38a278..13ca89e 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -154,10 +154,11 @@
 
 /*
  * Callback applied to root references during the initial root
- * marking.  Visited roots are always marked but are only pushed on
- * the mark stack if their address is below the finger.
+ * marking.  Marks white objects but does not push them on the mark
+ * stack.
  */
-static void rootMarkObjectVisitor(void *addr, RootType type, u4 thread, void *arg)
+static void rootMarkObjectVisitor(void *addr, RootType type, u4 thread,
+                                  void *arg)
 {
     Object *obj;
     GcMarkContext *ctx;
@@ -205,11 +206,11 @@
 }
 
 /*
- * Callback applied to root references during root remarking.  If the
- * root location contains a white reference it is pushed on the mark
- * stack and grayed.
+ * Callback applied to root references during root remarking.  Marks
+ * white objects and pushes them on the mark stack.
  */
-static void markObjectVisitor(void *addr, RootType type, u4 thread, void *arg)
+static void rootReMarkObjectVisitor(void *addr, RootType type, u4 thread,
+                                    void *arg)
 {
     Object *obj;
     GcMarkContext *ctx;
@@ -230,7 +231,7 @@
 {
     GcMarkContext *ctx = &gDvm.gcHeap->markContext;
     assert(ctx->finger == (void *)ULONG_MAX);
-    dvmVisitRoots(markObjectVisitor, ctx);
+    dvmVisitRoots(rootReMarkObjectVisitor, ctx);
 }
 
 /*