RFR (S): 8010294: Refactor HeapInspection to make it more reusable
erik.helin at oracle.com
Mon Mar 25 06:36:37 PDT 2013
thanks for reviewing!
On 03/25/2013 02:28 PM, Mikael Gerdin wrote:
> On 2013-03-25 09:32, Erik Helin wrote:
>> 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:
> This looks good,
> I have some small comments but I'll leave it to you to decide if you
> want to fix them or not.
> When you're changing this line, would you mind adding a space before
> _elements = new (ResourceObj::C_HEAP, mtInternal)
Sure, I will add the space before I push.
> Did you consider using
> SharedHeap::heap() instead of:
> SharedHeap* sh = (SharedHeap*)Universe::heap();
Nope, did not know about this, thanks for the tip! I will update the
code before I push.
> Either way, ship it.
>> 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).
>>> - JPRT
>>> - A new jtreg test (see webrev)
More information about the hotspot-gc-dev