OSDN Git Service

Remove logging of memory management statistics to the event log.
[android-x86/dalvik.git] / vm / alloc / HeapInternal.h
index f078fdd..119c417 100644 (file)
 #include "HeapTable.h"
 #include "MarkSweep.h"
 
+typedef struct HeapSource HeapSource;
+
 struct GcHeap {
     HeapSource      *heapSource;
 
-    /* List of heap objects that the GC should never collect.
-     * These should be included in the root set of objects.
-     */
-    HeapRefTable    nonCollectableRefs;
-
     /* List of heap objects that will require finalization when
      * collected.  I.e., instance objects
      *
@@ -98,26 +95,14 @@ struct GcHeap {
      */
     GcMarkContext   markContext;
 
-    /* Set to dvmGetRelativeTimeUsec() whenever a GC begins.
-     * The value is preserved between GCs, so it can be used
-     * to determine the time between successive GCs.
-     * Initialized to zero before the first GC.
-     */
-    u8              gcStartTime;
+    /* GC's card table */
+    u1*             cardTableBase;
+    size_t          cardTableLength;
 
     /* Is the GC running?  Used to avoid recursive calls to GC.
      */
     bool            gcRunning;
 
-#if DVM_TRACK_HEAP_MARKING
-    /* Every time an unmarked object becomes marked, markCount
-     * is incremented and markSize increases by the size of
-     * that object.
-     */
-    size_t          markCount;
-    size_t          markSize;
-#endif
-
     /*
      * Debug control values
      */
@@ -127,21 +112,10 @@ struct GcHeap {
     int             ddmHpsgWhat;
     int             ddmNhsgWhen;
     int             ddmNhsgWhat;
-
-#if WITH_HPROF
-    bool            hprofDumpOnGc;
-    const char*     hprofFileName;
-    hprof_context_t *hprofContext;
-    int             hprofResult;
-    bool            hprofDirectToDdms;
-#endif
 };
 
 bool dvmLockHeap(void);
 void dvmUnlockHeap(void);
-void dvmLogGcStats(size_t numFreed, size_t sizeFreed, size_t gcTimeMs);
-void dvmLogMadviseStats(size_t madvisedSizes[], size_t arrayLen);
-void dvmHeapSizeChanged(void);
 
 /*
  * Logging helpers
@@ -156,21 +130,11 @@ void dvmHeapSizeChanged(void);
 #define LOGV_HEAP(...)    LOG(LOG_VERBOSE, HEAP_LOG_TAG, __VA_ARGS__)
 #define LOGD_HEAP(...)    LOG(LOG_DEBUG, HEAP_LOG_TAG, __VA_ARGS__)
 #endif
-#define LOGI_HEAP(...)    LOG(LOG_INFO, HEAP_LOG_TAG, __VA_ARGS__)
+#define LOGI_HEAP(...) \
+    (!gDvm.zygote ? LOG(LOG_INFO, HEAP_LOG_TAG, __VA_ARGS__) : (void)0)
 #define LOGW_HEAP(...)    LOG(LOG_WARN, HEAP_LOG_TAG, __VA_ARGS__)
 #define LOGE_HEAP(...)    LOG(LOG_ERROR, HEAP_LOG_TAG, __VA_ARGS__)
 
-#define QUIET_ZYGOTE_GC 1
-#if QUIET_ZYGOTE_GC
-#undef LOGI_HEAP
-#define LOGI_HEAP(...) \
-    do { \
-        if (!gDvm.zygote) { \
-            LOG(LOG_INFO, HEAP_LOG_TAG, __VA_ARGS__); \
-        } \
-    } while (false)
-#endif
-
 #define FRACTIONAL_MB(n)    (n) / (1024 * 1024), \
                             ((((n) % (1024 * 1024)) / 1024) * 1000) / 1024
 #define FRACTIONAL_PCT(n,max)    ((n) * 100) / (max), \