[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mat-dev] BHeapSampler memory analysis tool made public
|
Hi Markus, Andrew,
some thoughts on your comments:
>> The Sampling approach always seemed interesting to me, but I only
>> thought about approximating certain memory usage indicators.
From the understanding that I have now, statistical sampling is the
biggest problem of my approach. Statistical error is a problem,
especially when looking for differences between two heapdumps, and the
fact that I have classes with multiple nodes in the graph (e.g. String,
ArrayList, ...), but only the total instance count for these classes (no
per-node instance counts) also is a direct consequence of the
statistical approach.
I now think that that one could get a better result via an exact
calculation in a comparable amount of processing time.
>> I do not 100% understand how you compute the the memory usage,
could you elaborate that a bit more?
I just count memory-paths. If you calculate 10 memory-paths per Megebyte
total size, than you can add 1/10 MB to every node that this path
includes. But prevent double counting: some memory-path contain a class
multiple times (e.g. in linked lists), in that case add the 1/10 MB to
that class only once.
>> Are you aware that MAT has a feature in the Dominator tree that
allows you to group by
>> class (or package)? I believe one could build an approximated
"memory domination graph"
>> by using the data from this view.
I understand that I can view any subtree of the dominator tree as a list
of cummulated shallow-sizes of the participating classes. But I don't
see how that can replace the class-level graph-view. Think about an evil
structure with the shallow size mainly in Strings, but located all over
in the smaller "branches" of the dominator tree. In the tree view, it's
below noise level, but in a class-level-graph, it will pop up as hotspot.
regards,
Arndt