RFR: 8254739: G1: Optimize evacuation failure for regions with few failed objects [v19]
mli at openjdk.java.net
Fri Nov 5 11:27:11 UTC 2021
On Fri, 5 Nov 2021 11:18:31 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> @Hamlin-Li : I think @albertnetymk concern is that typically an `iterate` method does not modify the list itself. That is surprising for readers. The documentation also does not indicate any of that. I do not think he believes this will cause a VM failure.
>> Maybe change `HeapRegion::iterate_evac_failure_objs` to call a (new) `drop()` method on `_evac_failure_objs`?
>> I think such a change would solve Albert's concerns.
>> An alternative could be renaming `iterate` to something else.
> Thank Thomas for unpacking my concern more precisely. I used "problematic" to mean the second iteration will not do what developers expect it to do, not necessarily a VM crash.
Thanks for your clarification, Albert, Thomas, I see your point, it make sense to me.
As this patch has been blocking some other issues for a while, and I think it's better to think of some good solution for Albert's concern (seems add a drop is a little bit redundant for me :).)
If you don't mind, can I do this refinement later in another issue? Thanks
More information about the hotspot-gc-dev