i created a heap dump of my application in order to control the amount of objects of a certain class.

The class histogramm view shows 4 objects (I used the fqcn as a regex). If I use the same filter in the dominator tree, I only can see two instances of that particular class. Using OQL in order to display the objects I also get 4 hits.

The filtering in trees in MAT works only on the first level. I suppose that on the roots level of the dominator tree there are only two instances of the class you are interested in. The other two should be somewhere deeper in the tree structure.

The dominator tree contains all the objects of the heap. The information about the children of a node is loaded lazily only when you expand it. Therefore we made the filtering to take into account only the top-level elements, so that we don't traverse all the millions of objects.