//leakcanary-repo/shark/DominatorTree
DominatorTree¶
[jvm]\ class DominatorTree(expectedElements: Int = 4)
Constructors¶
DominatorTree | [jvm] constructor(expectedElements: Int = 4) |
Types¶
Name | Summary |
---|---|
ObjectSizeCalculator | [jvm] fun interface ObjectSizeCalculator |
Functions¶
Name | Summary |
---|---|
buildFullDominatorTree | [jvm] fun buildFullDominatorTree(objectSizeCalculator: DominatorTree.ObjectSizeCalculator): Map<Long, ObjectDominators.DominatorNode> |
computeRetainedSizes | [jvm] fun computeRetainedSizes(retainedObjectIds: LongSet, objectSizeCalculator: DominatorTree.ObjectSizeCalculator): LongLongMap Computes the size retained by retainedObjectIds using the dominator tree built using updateDominated. The shallow size of each object is provided by objectSizeCalculator. |
contains | [jvm] operator fun contains(objectId: Long): Boolean |
get | [jvm] operator fun get(dominatedObjectId: Long): Long Returns the dominator object id or ValueHolder.NULL_REFERENCE if dominatedObjectId is the root dominator. |
updateDominated | [jvm] fun updateDominated(objectId: Long, parentObjectId: Long): Boolean Records that objectId can be reached through parentObjectId, updating the dominator for objectId to be either parentObjectId if objectId has no known dominator and otherwise to the Lowest Common Dominator between parentObjectId and the previously determined dominator for objectId. |
updateDominatedAsRoot | [jvm] fun updateDominatedAsRoot(objectId: Long): Boolean Records that objectId is a root. |