<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I'll be happy if we provided a parameter to limit the histogram
    output. But, I would personally recommend that the default value for
    this is "unbounded" for the reasons I described in my previous
    e-mail... <br>
    <br>
    Tony<br>
    <br>
    On 11/14/2011 02:37 PM, Srinivas Ramakrishna wrote:
    <blockquote
cite="mid:CABzyjyk_1dACf-3QYM+DLX8DXALPRDUR7GdMpA3r0KzqNE8bEA@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">On Mon, Nov 14, 2011 at 7:13 AM, Tony
        Printezis <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:tony.printezis@oracle.com">tony.printezis@oracle.com</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> Ramki,<br>
            <br>
            First, which version of the class histogram are you
            referring to? I assume it's the one we generate from within
            the JVM which goes to the GC log? If you were using jmap you
            could just pipe the output to head or similar.<br>
          </div>
        </blockquote>
        <div><br>
          Right -- the former.<br>
           <br>
        </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            Is your concern mainly to keep the class histogram output
            reasonably compact? FWIW, and I don't know how common this
            scenario is, I once tracked down a leak by noticing that
            they were 2 instances of a particular class instead of 1 (I
            was replacing once instance with a newly-allocated one, but
            the original one ended up being queued up for finalization
            and held on to a lot of space). If we only dumped the top N
            classes I would have missed this piece of information.<br>
          </div>
        </blockquote>
        <div><br>
          Sure. I can imagine there are cases where the skinny tail is
          interesting and indeed vital. My guess (as i indicated in the
          email) was that perhaps the<br>
          common use case was in the top part of the histogram, and the
          objective as you stated was compactness :-)<br>
           <br>
        </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            Maybe adding a new -XX parameter :-) to set N would be a
            good compromise?<br>
          </div>
        </blockquote>
        <div><br>
          Sure. That's what i was suggesting, plus that the default be
          to favor compactness (because of my guesstimate on how the
          use-cases fell in practice,<br>
          a guesstimate that could be wrong since it was based on
          subjective experience rather than a survey :-)<br>
          <br>
          thanks!<br>
          -- ramki<br>
           <br>
        </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            Tony
            <div>
              <div class="h5"><br>
                <br>
                On 11/11/2011 5:31 PM, Srinivas Ramakrishna wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5"><br>
                  I am posting this to hotspot-gc-use, but the idea is
                  that it also post to -dev (but given how<br>
                  the lists are arranged, I am posting directly to the
                  one and not the other to avoid double copies<br>
                  to those who are in the intersection of the two kists,
                  while covering those in the union of the two).<br>
                  <br>
                  I've noticed recently in my use of the the class
                  histogram feature, that in typical cases I am
                  interested<br>
                  in the top few types of objects and not in the long
                  thin tail. I am not sure how typical my use or<br>
                  experience is, but it would appear to me (based on my
                  limited experience of late) that if we limited<br>
                  the histogram output to the top "N" (for say N = 40 or
                  so) classes by default, it would likely satisfy<br>
                  80-90% of use cases. For the remaining 10% of use
                  cases, one would provide a complete dump,<br>
                  or a dump with more entries than available by default.
                  <br>
                  <br>
                  I wanted to run this suggestion by everyone and see
                  whether this would have some traction<br>
                  wrt such a request.<br>
                  <br>
                  I am guessing that this may be especially useful when
                  dealing with very large applications that<br>
                  may have many different types of objects in the heap
                  and might present a very long thin (and in<br>
                  many cases uninteresting) tail. (There may be other
                  ways of restricting the output, for example<br>
                  by cutting off output below a certain population or
                  volume threshold, but simply displaying the<br>
                  top N most voluminous or populous classes would seem
                  to be the simplest....)<br>
                  <br>
                  Comments?<br>
                  -- ramki<br>
                  <br>
                  <br>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </div>
              </div>
              <pre>_______________________________________________
hotspot-gc-use mailing list
<a moz-do-not-send="true" href="mailto:hotspot-gc-use@openjdk.java.net" target="_blank">hotspot-gc-use@openjdk.java.net</a>
<a moz-do-not-send="true" href="http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use" target="_blank">http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use</a>
</pre>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
  </body>
</html>