Heap.cpp: disable verbose GC debugging
This is annoying, and we don't care.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
diff --git a/vm/alloc/Heap.cpp b/vm/alloc/Heap.cpp
index 4a8d165..da5ae87 100644
--- a/vm/alloc/Heap.cpp
+++ b/vm/alloc/Heap.cpp
@@ -428,6 +428,7 @@
dvmVerifyBitmap(dvmHeapSourceGetLiveBits());
}
+#define GC_VERBOSE_DEBUG 0
/*
* Initiate garbage collection.
*
@@ -445,14 +446,17 @@
void dvmCollectGarbageInternal(const GcSpec* spec)
{
GcHeap *gcHeap = gDvm.gcHeap;
- u4 gcEnd = 0;
u4 rootStart = 0 , rootEnd = 0;
u4 dirtyStart = 0, dirtyEnd = 0;
size_t numObjectsFreed, numBytesFreed;
size_t currAllocated, currFootprint;
- size_t percentFree;
int oldThreadPriority = INT_MAX;
+#if GC_VERBOSE_DEBUG
+ u4 gcEnd = 0;
+ size_t percentFree;
+#endif
+
/* The heap lock must be held.
*/
@@ -662,6 +666,7 @@
*/
dvmEnqueueClearedReferences(&gDvm.gcHeap->clearedReferences);
+#if GC_VERBOSE_DEBUG
gcEnd = dvmGetRelativeTimeMsec();
percentFree = 100 - (size_t)(100.0f * (float)currAllocated / currFootprint);
if (!spec->isConcurrent) {
@@ -688,6 +693,7 @@
currAllocated / 1024, currFootprint / 1024,
rootTime, dirtyTime, gcTime);
}
+#endif
if (gcHeap->ddmHpifWhen != 0) {
LOGD_HEAP("Sending VM heap info to DDM");
dvmDdmSendHeapInfo(gcHeap->ddmHpifWhen, false);