Hi ZGC Developers,
I've encountered an issue where ZGC might fail to promote objects
under a specific condition, leading to a memory leak. This patch aims
to fix it.
* Problem:
The number of selected pages in the ZGC log is incorrect.
* Fix:
The root cause lies in the execution of function
ZRelocationSetSelectorGroup::select_inner, where the count of selected
pages only includes the pages that satisfy the condition
diff_reclaimable > _fragmentation_limit, while ignoring the previously
accumulated pages.
This results in a mismatch between the number of pages actually
reclaimed during relocation and the count reflected in the log.
I have attached my modifications in the attachment.
* Testing:
I've tested this fix by jtreg.
I would like to ask ZGC developers to review whether this can be
created as an issue. Once it is created, how should I commit my
modifications for it? Furthermore, how can I become an OpenJDK author?
Please help to review this patch. Any feedback is appreciated.
Thanks,
Yifan Zhang