DominatorTree

class DominatorTree(expectedElements: Int = 4)

Constructors

Link copied to clipboard
constructor(expectedElements: Int = 4)

Types

Link copied to clipboard
fun interface ObjectSizeCalculator

Functions

Link copied to clipboard
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.

Link copied to clipboard
operator fun contains(objectId: Long): Boolean
Link copied to clipboard
operator fun get(dominatedObjectId: Long): Long

Returns the dominator object id or ValueHolder.NULL_REFERENCE if dominatedObjectId is the root dominator.

Link copied to clipboard
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.

Link copied to clipboard

Records that objectId is a root.