|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.android.ddmlib.NativeAllocationInfo
public final 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 String |
ALLOCATIONS_KW
|
static String |
BEGIN_STACKTRACE_KW
|
static String |
END_STACKTRACE_KW
|
static String |
SIZE_KW
|
static 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(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. |
List<NativeStackCallInfo> |
getResolvedStackCall()
Returns the resolved stack call. |
int |
getSize()
Returns the total size of this allocation. |
List<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(List<NativeStackCallInfo> resolvedStackCall)
Sets the resolved stack call for this allocation. |
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 String END_STACKTRACE_KW
public static final String BEGIN_STACKTRACE_KW
public static final String TOTAL_SIZE_KW
public static final String SIZE_KW
public static final String ALLOCATIONS_KW
Constructor Detail |
---|
public NativeAllocationInfo(int size, int allocations)
NativeAllocationInfo
.
size
- The size of the allocations.allocations
- the allocation countMethod 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 List<Long> getStackCallAddresses()
public void setResolvedStackCall(List<NativeStackCallInfo> resolvedStackCall)
resolvedStackCall
is non null
then
isStackCallResolved()
will return true
after this call.
resolvedStackCall
- The list of NativeStackCallInfo
.public List<NativeStackCallInfo> getResolvedStackCall()
NativeStackCallInfo
or null
if the stack call
was not resolved.#setResolvedStackCall(ArrayList)
,
isStackCallResolved()
public boolean equals(Object obj)
equals
in class Object
obj
- 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 int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
Object.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(ArrayList)
,
isStackCallResolved()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |