RFR (S): 8227671: G1: assert_used_and_recalculate_used_equal performs work in product builds

sangheon.kim at oracle.com sangheon.kim at oracle.com
Mon Jul 15 17:57:53 UTC 2019


Hi Thomas,

On 7/15/19 8:38 AM, Thomas Schatzl wrote:
> Hi all,
>
>    can I have reviews for this small change that avoids doing
> unneccessary work in product builds?
>
> In particular, the assert_used_and_recalculate_used_equal macro
> executes code (the recalculate_used() call) that is potentially
> lengthy.
>
> I measured a few ms on a large heap (50GB) with (forced) 50k regions. I
> am not sure why this call is so expensive in my tests, but it is
> completely unnecessary.
It is expensive because recalculate_used() iterates all heap regions?

>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8227671
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8227671/webrev/
Looks good to me and thanks for fixing this!

Thanks,
Sangheon


> Testing:
> Currently running hs-tier1-3, local gc/g1 jtreg run, local benchmarks
>
> Thanks,
>    Thomas
>
>




More information about the hotspot-gc-dev mailing list