summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2011-02-28 18:14:22 -0800
committerCarl Shapiro <cshapiro@google.com>2011-02-28 18:14:22 -0800
commit97c3dddbcf9b7426ef2f10e0903eeb4b5a884733 (patch)
tree471df2311180a5a5fa0b6c2005f576d22437497c
parent41afa96d21bfd7e42250f659bca63b07b9430bba (diff)
downloadandroid_dalvik-97c3dddbcf9b7426ef2f10e0903eeb4b5a884733.tar.gz
android_dalvik-97c3dddbcf9b7426ef2f10e0903eeb4b5a884733.tar.bz2
android_dalvik-97c3dddbcf9b7426ef2f10e0903eeb4b5a884733.zip
Add comments describing the dump references visitor.
Change-Id: I9346cb7254c76c60b7d4feb412bfc4be4df4d73a
-rw-r--r--vm/alloc/Verify.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vm/alloc/Verify.c b/vm/alloc/Verify.c
index 9cc5c80a3..f36f44bf1 100644
--- a/vm/alloc/Verify.c
+++ b/vm/alloc/Verify.c
@@ -20,6 +20,11 @@
#include "alloc/Verify.h"
#include "alloc/Visit.h"
+/*
+ * Visitor applied to each reference field when searching for things
+ * that point to an object. Sets the argument to NULL when a match is
+ * found.
+ */
static void dumpReferencesVisitor(void *pObj, void *arg)
{
Object *obj = *(Object **)pObj;
@@ -29,6 +34,10 @@ static void dumpReferencesVisitor(void *pObj, void *arg)
}
}
+/*
+ * Visitor applied to each bitmap element to search for things that
+ * point to an object. Logs a message when a match is found.
+ */
static void dumpReferencesCallback(void *ptr, void *arg)
{
Object *obj = (Object *)arg;
@@ -42,6 +51,10 @@ static void dumpReferencesCallback(void *ptr, void *arg)
}
}
+/*
+ * Visitor applied to each root to search for things that point to an
+ * object. Logs a message when a match is found.
+ */
static void dumpReferencesRootVisitor(void *ptr, u4 threadId,
RootType type, void *arg)
{