public static class Debug.MemoryInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Debug.MemoryInfo> |
CREATOR |
int |
dalvikPrivateClean |
int |
dalvikPrivateDirty
The private dirty pages used by dalvik heap.
|
int |
dalvikPss
The proportional set size for dalvik heap.
|
int |
dalvikSharedClean |
int |
dalvikSharedDirty
The shared dirty pages used by dalvik heap.
|
int |
dalvikSwappablePss |
int |
dalvikSwappedOut |
int |
dalvikSwappedOutPss |
boolean |
hasSwappedOutPss |
static int |
HEAP_DALVIK |
static int |
HEAP_NATIVE |
static int |
HEAP_UNKNOWN |
int |
nativePrivateClean |
int |
nativePrivateDirty
The private dirty pages used by the native heap.
|
int |
nativePss
The proportional set size for the native heap.
|
int |
nativeSharedClean |
int |
nativeSharedDirty
The shared dirty pages used by the native heap.
|
int |
nativeSwappablePss |
int |
nativeSwappedOut |
int |
nativeSwappedOutPss |
static int |
NUM_CATEGORIES |
static int |
NUM_DVK_STATS |
static int |
NUM_OTHER_STATS |
static int |
offsetPrivateClean |
static int |
offsetPrivateDirty |
static int |
offsetPss |
static int |
offsetSharedClean |
static int |
offsetSharedDirty |
static int |
offsetSwappablePss |
static int |
offsetSwappedOut |
static int |
offsetSwappedOutPss |
static int |
OTHER_APK |
static int |
OTHER_ART |
static int |
OTHER_ASHMEM |
static int |
OTHER_CURSOR |
static int |
OTHER_DALVIK_ACCOUNTING |
static int |
OTHER_DALVIK_CODE_CACHE |
static int |
OTHER_DALVIK_INDIRECT_REFERENCE_TABLE |
static int |
OTHER_DALVIK_LARGE |
static int |
OTHER_DALVIK_LINEARALLOC |
static int |
OTHER_DALVIK_NON_MOVING |
static int |
OTHER_DALVIK_NORMAL |
static int |
OTHER_DALVIK_OTHER |
static int |
OTHER_DALVIK_ZYGOTE |
static int |
OTHER_DEX |
static int |
OTHER_GL |
static int |
OTHER_GL_DEV |
static int |
OTHER_GRAPHICS |
static int |
OTHER_JAR |
static int |
OTHER_OAT |
static int |
OTHER_OTHER_MEMTRACK |
static int |
OTHER_SO |
static int |
OTHER_STACK |
static int |
OTHER_TTF |
static int |
OTHER_UNKNOWN_DEV |
static int |
OTHER_UNKNOWN_MAP |
int |
otherPrivateClean |
int |
otherPrivateDirty
The private dirty pages used by everything else.
|
int |
otherPss
The proportional set size for everything else.
|
int |
otherSharedClean |
int |
otherSharedDirty
The shared dirty pages used by everything else.
|
int |
otherSwappablePss |
int |
otherSwappedOut |
int |
otherSwappedOutPss |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
MemoryInfo() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
String |
getMemoryStat(String statName)
Returns the value of a particular memory statistic or
null if no
such memory statistic exists. |
Map<String,String> |
getMemoryStats()
Returns a map of the names/values of the memory statistics
that
getMemoryStat(String) supports. |
static String |
getOtherLabel(int which) |
int |
getOtherPrivate(int which) |
int |
getOtherPrivateClean(int which) |
int |
getOtherPrivateDirty(int which) |
int |
getOtherPss(int which) |
int |
getOtherSharedClean(int which) |
int |
getOtherSharedDirty(int which) |
int |
getOtherSwappablePss(int which) |
int |
getOtherSwappedOut(int which) |
int |
getOtherSwappedOutPss(int which) |
int |
getSummaryCode()
Pss of code and other static resource bytes in KB due to
the application.
|
int |
getSummaryGraphics()
Pss in KB of graphics due to the application.
|
int |
getSummaryJavaHeap()
Pss of Java Heap bytes in KB due to the application.
|
int |
getSummaryNativeHeap()
Pss of Native Heap bytes in KB due to the application.
|
int |
getSummaryPrivateOther()
Pss in KB due to the application that haven't otherwise been
accounted for.
|
int |
getSummaryStack()
Pss in KB of the stack due to the application.
|
int |
getSummarySystem()
Pss in KB due to the system.
|
int |
getSummaryTotalPss()
Total Pss in KB.
|
int |
getSummaryTotalSwap()
Total Swap in KB.
|
int |
getSummaryTotalSwapPss()
Total proportional Swap in KB.
|
int |
getTotalPrivateClean()
Return total shared clean memory usage in kB.
|
int |
getTotalPrivateDirty()
Return total private dirty memory usage in kB.
|
int |
getTotalPss()
Return total PSS memory usage in kB.
|
int |
getTotalSharedClean()
Return total shared clean memory usage in kB.
|
int |
getTotalSharedDirty()
Return total shared dirty memory usage in kB.
|
int |
getTotalSwappablePss()
Return total PSS memory usage in kB mapping a file of one of the following extension:
.so, .jar, .apk, .ttf, .dex, .odex, .oat, .art .
|
int |
getTotalSwappedOut()
Return total swapped out memory in kB.
|
int |
getTotalSwappedOutPss()
Return total swapped out memory in kB, proportional.
|
int |
getTotalUss() |
boolean |
hasSwappedOutPss()
Return true if the kernel is reporting pss swapped out...
|
void |
readFromParcel(Parcel source) |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public int dalvikPss
public int dalvikSwappablePss
public int dalvikPrivateDirty
public int dalvikSharedDirty
public int dalvikPrivateClean
public int dalvikSharedClean
public int dalvikSwappedOut
public int dalvikSwappedOutPss
public int nativePss
public int nativeSwappablePss
public int nativePrivateDirty
public int nativeSharedDirty
public int nativePrivateClean
public int nativeSharedClean
public int nativeSwappedOut
public int nativeSwappedOutPss
public int otherPss
public int otherSwappablePss
public int otherPrivateDirty
public int otherSharedDirty
public int otherPrivateClean
public int otherSharedClean
public int otherSwappedOut
public int otherSwappedOutPss
public boolean hasSwappedOutPss
public static final int HEAP_UNKNOWN
public static final int HEAP_DALVIK
public static final int HEAP_NATIVE
public static final int OTHER_DALVIK_OTHER
public static final int OTHER_STACK
public static final int OTHER_CURSOR
public static final int OTHER_ASHMEM
public static final int OTHER_GL_DEV
public static final int OTHER_UNKNOWN_DEV
public static final int OTHER_SO
public static final int OTHER_JAR
public static final int OTHER_APK
public static final int OTHER_TTF
public static final int OTHER_DEX
public static final int OTHER_OAT
public static final int OTHER_ART
public static final int OTHER_UNKNOWN_MAP
public static final int OTHER_GRAPHICS
public static final int OTHER_GL
public static final int OTHER_OTHER_MEMTRACK
public static final int OTHER_DALVIK_NORMAL
public static final int OTHER_DALVIK_LARGE
public static final int OTHER_DALVIK_LINEARALLOC
public static final int OTHER_DALVIK_ACCOUNTING
public static final int OTHER_DALVIK_CODE_CACHE
public static final int OTHER_DALVIK_ZYGOTE
public static final int OTHER_DALVIK_NON_MOVING
public static final int OTHER_DALVIK_INDIRECT_REFERENCE_TABLE
public static final int NUM_OTHER_STATS
public static final int NUM_DVK_STATS
public static final int NUM_CATEGORIES
public static final int offsetPss
public static final int offsetSwappablePss
public static final int offsetPrivateDirty
public static final int offsetSharedDirty
public static final int offsetPrivateClean
public static final int offsetSharedClean
public static final int offsetSwappedOut
public static final int offsetSwappedOutPss
public static final Parcelable.Creator<Debug.MemoryInfo> CREATOR
public int getTotalPss()
public int getTotalUss()
public int getTotalSwappablePss()
public int getTotalPrivateDirty()
public int getTotalSharedDirty()
public int getTotalPrivateClean()
public int getTotalSharedClean()
public int getTotalSwappedOut()
public int getTotalSwappedOutPss()
public int getOtherPss(int which)
public int getOtherSwappablePss(int which)
public int getOtherPrivateDirty(int which)
public int getOtherSharedDirty(int which)
public int getOtherPrivateClean(int which)
public int getOtherPrivate(int which)
public int getOtherSharedClean(int which)
public int getOtherSwappedOut(int which)
public int getOtherSwappedOutPss(int which)
public static String getOtherLabel(int which)
public String getMemoryStat(String statName)
null
if no
such memory statistic exists.
The following table lists the memory statistics that are supported. Note that memory statistics may be added or removed in a future API level.
Memory statistic name | Meaning | Example | Supported (API Levels) |
---|---|---|---|
summary.java-heap | The private Java Heap usage in kB. This corresponds to the Java Heap field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.native-heap | The private Native Heap usage in kB. This corresponds to the Native Heap field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.code | The memory usage for static code and resources in kB. This corresponds to the Code field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.stack | The stack usage in kB. This corresponds to the Stack field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.graphics | The graphics usage in kB. This corresponds to the Graphics field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.private-other | Other private memory usage in kB. This corresponds to the Private Other field output in the App Summary section by dumpsys meminfo. | 1442 |
23 |
summary.system | Shared and system memory usage in kB. This corresponds to the System field output in the App Summary section by dumpsys meminfo. | 1442 |
23 |
summary.total-pss | Total PPS memory usage in kB. | 1442 |
23 |
summary.total-swap | Total swap usage in kB. | 1442 |
23 |
public Map<String,String> getMemoryStats()
getMemoryStat(String)
supports.public int getSummaryJavaHeap()
public int getSummaryNativeHeap()
public int getSummaryCode()
public int getSummaryStack()
public int getSummaryGraphics()
public int getSummaryPrivateOther()
public int getSummarySystem()
public int getSummaryTotalPss()
public int getSummaryTotalSwap()
getSummaryTotalSwapPss()
will report the application proportional Swap.public int getSummaryTotalSwapPss()
hasSwappedOutPss
is false.public boolean hasSwappedOutPss()
getSummaryTotalSwapPss()
will return non-0 values.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public void readFromParcel(Parcel source)