Search Results for

    Show / Hide Table of Contents

    Shortest root paths

    Under the Shortest root paths panel, information about the shortest root paths for all live instances is presented. The shortest root paths page is not available for native resources.

    The root paths presented here combine the shortest root path of each instance by only looking at the types that are part of the root path, not the actual instances.

    Example:

    Assume that two instances of the type ItemClass (#123 and #141) exist and that they have the following shortest root paths (where ContainerClass.allContainers is a static field).

    ItemClass (#123) ItemClass (#141)

    ContainerClass (#456) ContainerClass (#560)

    ArrayList (#193) ArrayList (#193)

    ContainerClass.allContainers ContainerClass.allContainers

    Since only managed type information is used, these two root paths can be combined into one:

    ItemClass

    ContainerClass

    ArrayList

    ContainerClass.allContainers

    This combined root path will have two live instances when presented under shortest root paths.

    For more information about root paths, see Root path.

    Sort root paths by

    The Sort root paths by field is used to define the order of the root paths. Below is a list of all the possible options; however, the available options depend on the selected field set and whether the type is a disposable class.

    The options are:

    • Live instances
      Shows the root paths with the most live instances first.

    • New live instances
      Shows the root paths with the most new live instances first.

    • Live bytes
      Shows the root paths with the most live bytes first.

    • New live bytes
      Shows the root paths with the most new live bytes first.

    • Disposed instances
      Shows the root paths with the most disposed instances first.

    • Memory leak instances
      Shows the root paths with the most memory leak instances first.

    Hide root paths with zero sort value

    If this checkbox is checked, then all root paths for which the sort value is zero will be hidden.

    Truncate root paths

    It is possible to truncate the root paths at a specific depth. This provides the possibility of combining the instance information from several root paths into a single root path. If root paths are truncated, the Depth field specifies the maximum depth of the root path. The following ways of truncating the root paths are available:

    • At root
      A root path will be truncated when the depth counted from the instance has reached the maximum value. The truncated root path will not contain the actual root, since it will end with a [Truncated] entry.

    • In the middle
      A root path will be truncated in the middle when the depth counted from both the instance and the root has reached the maximum value. The truncated root path will contain both the actual root and the entry closest to the instance. A [Truncated] entry will be added in the middle.

    • At instance
      A root path will be truncated when the depth counted from the root has reached the maximum value. The truncated root path will not contain the entries closest to the instance, since it will start with a [Truncated] entry.

    Example:

    Consider the following instance root paths.

    ItemClass (#123) ItemClass (#141)

    ContainerClass (#456) ContainerClass (#560)

    AnotherClass (#129) AnotherClass (#443)

    ArrayList (#193) ContainerClass (#543)

    ContainerClass.allContainers ArrayList (#193)*

    ContainerClass.allContainers

    If the root paths are truncated at a depth of two, then both root paths can be combined into one (regardless of how the roots are truncated). Below is an example of how the roots are combined depending on the truncation.

    At instance: [Truncated] ArrayList ContainerClass.allContainers

    In the middle: ItemClass [Truncated] ContainerClass.allContainers

    At root: ItemClass ContainerClass [Truncated]

    On the other hand, if the root path depth is set to three, the root paths cannot be combined if **At instance **is selected:

    At instance (1): [Truncated] AnotherClass ArrayList ContainerClass.allContainers

    At instance (2): [Truncated] ContainerClass ArrayList ContainerClass.allContainers

    Note

    Even though the actual fields that contains the reference from one instance to another is presented in the root path, the field is not considered when looking for root paths to combine. But when two root paths are combined, the fields will also be combined.

    Prioritize static fields

    The Prioritize static fields checkbox can be used to give higher priority to root paths that start with a static field. That is, if a static field keeps an instance alive, then the root path starting at the field will be used, even if there another root path starting with a GCHandle or method that is shorter.

    Root path

    The Root path group box is used to present a single root path. The navigator buttons above the root path can be used to select which root path to show.

    Below the root path, an info panel is used to present information about the instances referenced by the root path. The fields presented include:

    • Live instances

    • New live instances

    • Live bytes

    • New live bytes

    • Disposed instances

    • Memory leak instances

    Each field corresponds to one of the columns presented under the Types/Resources page.

    The actual fields included in the info panel and the way they are presented depend on the selected field set and whether the selected class is a disposable class.

    Show details

    This button can be used to show the details for the selected root path. The details are shown as an instance and allocation filter.

    In This Article
    Back to top

    © Copyright 2002-2020. SciTech Software AB.
    For information about .NET Memory Profiler, see the product site at https://memprofiler.com