|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.ddmlib.NativeAllocationInfo
public class NativeAllocationInfo
Stores native allocation information.
Contains number of allocations, their size and the stack trace. Note: the ddmlib does not resolve the stack trace automatically. While this class provides storage for resolved stack trace, this is merely for convenience.
| Field Summary | |
|---|---|
static java.lang.String |
ALLOCATIONS_KW
|
static java.lang.String |
BEGIN_STACKTRACE_KW
|
static java.lang.String |
END_STACKTRACE_KW
|
static java.lang.String |
SIZE_KW
|
static java.lang.String |
TOTAL_SIZE_KW
|
| Constructor Summary | |
|---|---|
NativeAllocationInfo(int size,
int allocations)
Constructs a new NativeAllocationInfo. |
|
| Method Summary | |
|---|---|
void |
addStackCallAddress(long address)
Adds a stack call address for this allocation. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
int |
getAllocationCount()
Returns the allocation count. |
NativeStackCallInfo |
getRelevantStackCallInfo()
Returns the first NativeStackCallInfo that is relevant. |
java.util.List<NativeStackCallInfo> |
getResolvedStackCall()
Returns the resolved stack call. |
int |
getSize()
Returns the size of this allocation. |
java.util.List<java.lang.Long> |
getStackCallAddresses()
Returns the stack call of this allocation as raw addresses. |
int |
hashCode()
|
boolean |
isStackCallResolved()
Returns whether the stack call addresses have been resolved into NativeStackCallInfo objects. |
boolean |
isZygoteChild()
Returns whether the allocation happened in a child of the zygote process. |
void |
setResolvedStackCall(java.util.List<NativeStackCallInfo> resolvedStackCall)
Sets the resolved stack call for this allocation. |
boolean |
stackEquals(NativeAllocationInfo mi)
|
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String END_STACKTRACE_KW
public static final java.lang.String BEGIN_STACKTRACE_KW
public static final java.lang.String TOTAL_SIZE_KW
public static final java.lang.String SIZE_KW
public static final java.lang.String ALLOCATIONS_KW
| Constructor Detail |
|---|
public NativeAllocationInfo(int size,
int allocations)
NativeAllocationInfo.
size - The size of the allocations.allocations - the allocation count| Method Detail |
|---|
public void addStackCallAddress(long address)
address - The address to add.public int getSize()
public boolean isZygoteChild()
public int getAllocationCount()
public boolean isStackCallResolved()
NativeStackCallInfo objects.
public java.util.List<java.lang.Long> getStackCallAddresses()
public void setResolvedStackCall(java.util.List<NativeStackCallInfo> resolvedStackCall)
resolvedStackCall is non null then
isStackCallResolved() will return true after this call.
resolvedStackCall - The list of NativeStackCallInfo.public java.util.List<NativeStackCallInfo> getResolvedStackCall()
NativeStackCallInfo or null if the stack call
was not resolved.setResolvedStackCall(List),
isStackCallResolved()public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.
true if this object is equal to the obj argument;
false otherwise.Object.equals(java.lang.Object)public boolean stackEquals(NativeAllocationInfo mi)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public NativeStackCallInfo getRelevantStackCallInfo()
NativeStackCallInfo that is relevant.
A relevant NativeStackCallInfo is a stack call that is not deep in the
lower level of the libc, but the actual method that performed the allocation.
NativeStackCallInfo or null if the stack call has not
been processed from the raw addresses.setResolvedStackCall(List),
isStackCallResolved()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||