diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java index 512e2127e6b0a..360e5c68675b7 100644 --- a/core/java/android/os/Debug.java +++ b/core/java/android/os/Debug.java @@ -34,6 +34,7 @@ import java.lang.annotation.Target; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.util.Map; import org.apache.harmony.dalvik.ddmc.Chunk; import org.apache.harmony.dalvik.ddmc.ChunkHandler; @@ -1100,6 +1101,95 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo VMDebug.resetAllocCount(VMDebug.KIND_ALL_COUNTS); } + /** + * Returns the value of a particular runtime statistic or {@code null} if no + * such runtime statistic exists. + * + *
The following table lists the runtime statistics that the runtime supports. + * Note runtime statistics may be added or removed in a future API level.
+ * + *| Runtime statistic name | + *Meaning | + *Example | + *Supported (API Levels) | + *
|---|---|---|---|
| art.gc.gc-count | + *The number of garbage collection runs. | + *{@code 164} | + *23 | + *
| art.gc.gc-time | + *The total duration of garbage collection runs in ms. | + *{@code 62364} | + *23 | + *
| art.gc.bytes-allocated | + *The total number of bytes that the application allocated. | + *{@code 1463948408} | + *23 | + *
| art.gc.bytes-freed | + *The total number of bytes that garbage collection reclaimed. | + *{@code 1313493084} | + *23 | + *
| art.gc.blocking-gc-count | + *The number of blocking garbage collection runs. | + *{@code 2} | + *23 | + *
| art.gc.blocking-gc-time | + *The total duration of blocking garbage collection runs in ms. | + *{@code 804} | + *23 | + *
| art.gc.gc-count-rate-histogram | + *The histogram of the number of garbage collection runs per 10 seconds. | + *{@code 0:34503,1:45350,2:11281,3:8088,4:43,5:8} | + *23 | + *
| art.gc.blocking-gc-count-rate-histogram | + *The histogram of the number of garbage collection runs per 10 seconds. | + *{@code 0:99269,1:1,2:1} | + *23 | + *