RFR (xs): 8221509: Refactor assert( G1CollectedHeap::used() == recalculate_used() ) with better message

sangheon.kim at oracle.com sangheon.kim at oracle.com
Mon May 6 17:05:56 UTC 2019


Hi Thomas,

On 5/6/19 3:12 AM, Thomas Schatzl wrote:
> Hi,
>
> On Tue, 2019-04-30 at 13:54 -0700, sangheon.kim at oracle.com wrote:
>> Hi all,
>>
>> Can I have some reviews that replace assert(used() ==
>> recalculated_used()) with better message?
>> Those assert messages are not much helpful as it doesn't include any
>> actual values on it so I'm suggesting to include actual values of
>> each and then replace as a macro.
>>
>> CR: https://bugs.openjdk.java.net/browse/JDK-8221509
>> webrev: http://cr.openjdk.java.net/~sangheki/8221509/webrev.0/
>> testing: local build
>    thanks for fixing this :)
>
> The only nit I have is maybe the assert could include what is actually
> checked, ie. something like assert_used_and_recalculate_used_equal()
> instead of just assert_used_and_recalculate_used().
>
> I would not need a re-review for the renaming.
Thanks for the review and the naming suggestion.
I will rename for 'assert_used_and_recalculate_used_equal()' before the 
push.

Thanks,
Sangheon


>
> Thanks,
>    Thomas
>




More information about the hotspot-gc-dev mailing list