One heap dump shows what is alive at one moment. It cannot say whether a number is growing, because it has no "before". These modes compare dumps of the same process: a pair for a clear
before-and-after, or a series of three or more for a timeline.
It compares classes, not objects. Object ids are not stable between dumps, so heaptrail counts instances and shallow bytes per class name, and compares those totals.
It is shallow. A diff shows growth in the bytes objects occupy themselves. Use --retained-size on one dump to see what the growth keeps alive.
It needs the same build. Obfuscated names change between builds, so compare dumps of one build, or restore names with --mapping first.
A diff is a signal, not a proof. Growth between two dumps taken seconds apart may be warm-up. Capture around a deliberate, repeatable action, and prefer a series.