dotMemory 2018.1 Help

Keymap:

Group by Dominators

The Group by Dominators view allows you to understand how memory is retained in your app. For example, you know that the major part of memory in your app is consumed by strings. Nevertheless, most likely, the subject of your optimizations are not these strings by themselves but data structures that store them. The Group by Dominators view answers the "Who retains the memory" question which is extremely important when analyzing ineffective memory usage. To answer this question properly, you should be acquainted with the concept of dominators.

What is a dominator?

The object A dominates the object B if every path to B from application's roots goes through A. In other words, the object B is retained in memory exclusively by the object A: If A is garbage collected, B is also garbage collected. For example, an array is a dominator for its elements (in case there are no other references to array elements). If there are more than one path to an object from app's roots, it is considered as not dominated or not exclusively retained object. For example, if the object C is retained by the objects A and B and A is garbage collected, C will stay in memory (as it is still referenced by B). That's why it is important to understand the difference between the domination path (any object on the path is retained only by one other object) and the retention path (an object on the path may be retained by any number of other objects).

Sunburst chart on the right: a graphical representation of the tree list.

Dominators tree

The tree on the right shows the tree of dominators for the selected object set.

The tree can work in two modes that can be selected with the corresponding buttons in the tree header:

Tree: All dominator nodes are shown. The dominators that take part in a domination path for the selected tree node are shown in bold.

Path: Only the dominators that take part in a domination path for the selected tree node are shown.

The list of dominators consists of the following columns:

Name

Description

Type

Type name. The number left to the type name shows how many objects of that type are retained that way. For example, elements of some array of integers A are retained in the exact same way (A -> element), but elements of an integer array B have another retention path (B -> element).

Retained Bytes

The overall size of exclusively retained objects in bytes.

Retained objects

The number of objects that are dominated by the dominator.

Sunburst chart

Sunburst chart on the left is a graphical representation of the dominators tree. The more memory a dominator retains, the larger the central angle.

The analysis of the dominators tree can be quite complicated as you have to expand its nodes and interpret the numbers in the Retained bytes column. In contrast, just a glance at the sunburst chart allows you to determine main dominators and largest structures in your app. A click on a dominator you're interested in will show you its domination path in the tree.

Consider the example below for better understanding of how the sunburst chart displays data from the dominators tree.

Zooming in and Out

If you want to take a more detailed look at a certain dominator subtree, you can change the scale of the chart.

To zoom in on a dominator

Do one of the following:

Double-click the corresponding arc in the chart or select Zoom in from its context menu.

Double-click the dominator in the tree or select the tree and press Enter.

The dominator will become a root of the chart.

To zoom back out

Click the center of the chart.

Example

For the convenience, when a group of dominators is too small to be displayed in the current scale, the chart shows them as one Smaller objects arc.

Filtering Objects

You can filter out objects that are of no interest for your analysis.

To narrow the list

Start typing the desired type name in the Filter field.

dotMemory will exclude all instances that don't match the pattern.

You can make your search more efficient by using the following tips:

Use CamelHumps. E.g. fo will return objects of both System.Drawing.Font and MS.Utility.FrugalObjectList types.

Use special symbols, like wildcards and others. The full list is shown in the table below.

Symbol

Description

Example

*

Wildcard

* All objects in the set

sys.*.data All types and namespaces that match the pattern. E.g. System.Data, System.Windows.Controls.Datagrid, and System.Windows.Data.Binding.

sys.*.data. Only namespaces that match the pattern. E.g. System.Windows.Data.Binding but notSystem.Windows.Controls.Datagrid.