RFR (S): 8010294: Refactor HeapInspection to make it more reusable

Erik Helin erik.helin at oracle.com
Mon Mar 25 01:32:59 PDT 2013


All,

I have updated the change based on internal feedback.

The changes between webrev.00 and webrev.01 are mostly in the test code:
- The test uses correct @summary description
- The test now uses the correct command line flags
- The test is more documented to describe how the test code is run

There is also a very minor change in the hotspot code. I am now using 
the operator != instead of operator > when comparing the missed count. 
This was done just to make the diff one line smaller :)

Please see new webrev at:
http://cr.openjdk.java.net/~ehelin/8010294/webrev.01/

Thanks,
Erik

On 03/22/2013 10:06 AM, Erik Helin wrote:
> Hi all,
>
> I have refactored the HeapInspection class to prepare for the
> vm/gc/detailed/object_count_after_gc event.
>
> The refactoring mainly consists of breaking up the rather long
> heap_inspect function to multiple small functions that can be reused.
>
> I also moved the public enums used to initialize KlassInfoTable and
> KlassInfoHisto to private constants. Now they no longer have to be
> passed as an argument to the constructor.
>
> I also added a test to ensure that my refactoring did not break anything
> (the test is not that extensive but at least it ensures that the basic
> stuff is working).
>
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8010294/webrev.00/
>
> Bug:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8010294
>
> Testing:
> - JPRT
> - A new jtreg test (see webrev)
>
> Thanks,
> Erik



More information about the hotspot-gc-dev mailing list