Class histogram output and chopping off long thin tails
Peter B. Kessler
Peter.B.Kessler at Oracle.COM
Fri Nov 11 15:19:12 PST 2011
This seems like a reasonable request. In fact, I thought there *was* a way not to print classes that had fewer than N bytes (or instances), but I don't see it (or any traces of it :-). The other way I've wanted to filter PrintClassHistogram is to only print objects of a particular class (or probably package). E.g., java.util.Hashtable and java.util.Hashtable$Entry, when I'm looking for a "leak" like that. Knowing me, I probably kludged those together with grep or awk.
Srinivas Ramakrishna wrote:
> I am posting this to hotspot-gc-use, but the idea is that it also post to -dev (but given how
> the lists are arranged, I am posting directly to the one and not the other to avoid double copies
> to those who are in the intersection of the two kists, while covering those in the union of the two).
> I've noticed recently in my use of the the class histogram feature, that in typical cases I am interested
> in the top few types of objects and not in the long thin tail. I am not sure how typical my use or
> experience is, but it would appear to me (based on my limited experience of late) that if we limited
> the histogram output to the top "N" (for say N = 40 or so) classes by default, it would likely satisfy
> 80-90% of use cases. For the remaining 10% of use cases, one would provide a complete dump,
> or a dump with more entries than available by default.
> I wanted to run this suggestion by everyone and see whether this would have some traction
> wrt such a request.
> I am guessing that this may be especially useful when dealing with very large applications that
> may have many different types of objects in the heap and might present a very long thin (and in
> many cases uninteresting) tail. (There may be other ways of restricting the output, for example
> by cutting off output below a certain population or volume threshold, but simply displaying the
> top N most voluminous or populous classes would seem to be the simplest....)
> -- ramki
hotspot-gc-use mailing list
hotspot-gc-use at openjdk.java.net
More information about the hotspot-gc-dev