OSDN Git Service

Fix reporting of initial pause time
authorAndy McFadden <fadden@android.com>
Tue, 8 Nov 2011 00:20:51 +0000 (16:20 -0800)
committerAndy McFadden <fadden@android.com>
Tue, 8 Nov 2011 00:20:51 +0000 (16:20 -0800)
The "rootEnd" time was being captured before dvmClearCardTable()
was called.

Bug 5567332

Change-Id: I5499f1648c3e41296c18fa5d95d834c2d2853e8f

vm/alloc/Heap.cpp

index 9eee817..4043840 100644 (file)
@@ -516,8 +516,8 @@ void dvmCollectGarbageInternal(const GcSpec* spec)
          * Resume threads while tracing from the roots.  We unlock the
          * heap to allow mutator threads to allocate from free space.
          */
-        rootEnd = dvmGetRelativeTimeMsec();
         dvmClearCardTable();
+        rootEnd = dvmGetRelativeTimeMsec();
         dvmUnlockHeap();
         dvmResumeAllThreads(SUSPEND_FOR_GC);
     }