RFR: 8259647: Add support for JFR event ObjectCountAfterGC to Shenandoah

earthling-amzn github.com+71722661+earthling-amzn at openjdk.java.net
Thu Feb 4 19:45:41 UTC 2021


On Thu, 4 Feb 2021 19:19:35 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>>> That certainly is bad news for pause times. Do you think it'd be feasible to "piggyback" the object count calculation on concurrent marking? Might address https://bugs.openjdk.java.net/browse/JDK-8258431 also.
>> 
>> This could certainly be done, in a similar fashion as liveness counting. However, it would have to be done such that it only actually counts objects when JFR is requesting it, and otherwise stays out of the way, because this costs marking performance. Which means doubling the number of mark-loops, and select the correct loop based on whether or not we need object counts.
>
>> That certainly is bad news for pause times. Do you think it'd be feasible to "piggyback" the object count calculation on concurrent marking? Might address https://bugs.openjdk.java.net/browse/JDK-8258431 also.
> 
> It dose not just count number of objects, but number of objects by type,  much more than liveness counting. Just add a branch in hot marking loop, I can foresee negative impact on performance.

Would it be possible to combine the object _counting_ closure and the object _marking_ closure into one aggregate closure and complete both calculations in one pass over the live objects? Of course, only do this when the JFR event is enabled (and even then, perhaps only do it periodically).

-------------

PR: https://git.openjdk.java.net/jdk/pull/2386


More information about the shenandoah-dev mailing list