|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.monitoring.runtime.instrumentation.AllocationRecorder
public class AllocationRecorder
The logic for recording allocations, called from bytecode rewritten by
AllocationInstrumenter.
| Constructor Summary | |
|---|---|
AllocationRecorder()
|
|
| Method Summary | |
|---|---|
static void |
addSampler(Sampler sampler)
Adds a Sampler that will get run every time an allocation is
performed from Java code. |
static void |
recordAllocation(Class<?> cls,
Object newObj)
|
static void |
recordAllocation(int count,
String desc,
Object newObj)
Records the allocation. |
static void |
recordAllocationForceForTest(int count,
String desc,
Object newObj)
Helper method to force recording; for unit tests only. |
static void |
recordAllocationForceForTestReal(int count,
String desc,
Object newObj,
int recurse)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AllocationRecorder()
| Method Detail |
|---|
public static void addSampler(Sampler sampler)
Sampler that will get run every time an allocation is
performed from Java code. Use this with extreme judiciousness!
sampler - The sampler to add.
public static void recordAllocation(Class<?> cls,
Object newObj)
public static void recordAllocation(int count,
String desc,
Object newObj)
count - the count of how many instances are being
allocated, if an array is being allocated. If an array is not being
allocated, then this value will be -1.desc - the descriptor of the class/primitive type
being allocated.newObj - the new Object whose allocation is being
recorded.
public static void recordAllocationForceForTest(int count,
String desc,
Object newObj)
public static void recordAllocationForceForTestReal(int count,
String desc,
Object newObj,
int recurse)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||