Hi, It seems like currently the only way to log rememebered set usage during GC is setting the G1SummarizeRSetStatsPeriod flag, which can be quite expensive. Testing on my local box, running BigRamTester (by Thomas Schatzl) with JDK11 + 10GB heap + 1GB RSet setup, it took hundreds of milliseconds to process and print those remembered set usage information, and this happened when the world is stopped.
After a little bit hacking and digging I found most of the time is spent on the following 2 operations: 1. Calculating the size of PerRegionTable freelist, with 1GB RSet usage, this freelist can contain more than half a million entries. 2. Calculating the occupancy of OtherRegionTable, which iterates over all PerRegionTables being used. After omitting these 2 operations, we can cut down the overall logging time of remembered set usage to ~1ms, under the same setup. Can we introduce a "lightweight" mode of remembered set logging that trims the above mentioned 2 operations? It makes it possible for turning on remebered set logging in prodcution envrionment, which really helps diagnose certain performance issues. Regards, Tianqi
_______________________________________________ hotspot-gc-use mailing list hotspot-gc-use@openjdk.java.net https://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use