public interface Sampler
Modifier and Type | Method | Description |
---|---|---|
void |
sampleAllocation(int count,
String desc,
Object newObj,
long size) |
Determines whether the object currently being allocated, with the given
size, should be traced.
|
void sampleAllocation(int count, String desc, Object newObj, long size)
count
- the int
count of how many instances are being
allocated. -1 means a simple new to distinguish from a 1-element array. 0
shows up as a value here sometimes; one reason is T[] toArray()-type
methods that require an array type argument (see ArrayList.toArray() for
example).desc
- the String
descriptor of the class/primitive type
being allocated.newObj
- the new Object
whose allocation we're
recording.size
- the size of the object being allocated.Copyright © 2009–2018 Google, Inc.. All rights reserved.