Replace a missing HPROF call in scanObject.

This code was accidentally removed when the implementation of the
scanObject routines in MarkSweep.c was superseded by code from their
analogs in Verify.c.

Change-Id: I9da6de01949130648d11172198b76db98dc184ee
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index c87c043..99ec2aa 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -505,16 +505,18 @@
  */
 static void scanObject(const Object *obj, GcMarkContext *ctx)
 {
-    ClassObject *clazz;
-
     assert(obj != NULL);
     assert(ctx != NULL);
     assert(obj->clazz != NULL);
-    clazz = obj->clazz;
+#if WITH_HPROF
+    if (gDvm.gcHeap->hprofContext != NULL) {
+        hprofDumpHeapObject(gDvm.gcHeap->hprofContext, obj);
+    }
+#endif
     /* Dispatch a type-specific scan routine. */
-    if (clazz == gDvm.classJavaLangClass) {
+    if (obj->clazz == gDvm.classJavaLangClass) {
         scanClassObject((ClassObject *)obj, ctx);
-    } else if (IS_CLASS_FLAG_SET(clazz, CLASS_ISARRAY)) {
+    } else if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISARRAY)) {
         scanArrayObject((ArrayObject *)obj, ctx);
     } else {
         scanDataObject((DataObject *)obj, ctx);