On Mon, 30 Oct 2023 13:43:33 GMT, Albert Mingkun Yang wrote:
>> Maybe rename `should_retain_evac_failed_region` to
>> `should_keep_retained_region[_in_old]` or something?
>
> Is it possible to drop 1 so that an obj is evac-fail iff it's pinned or OOM?
> (I feel "retain" is on region-level.)
Th
On Mon, 30 Oct 2023 13:46:21 GMT, Albert Mingkun Yang wrote:
>> Apart from having an early return in the `should_compact`-if, one option
>> would be making `has_pinned_objects()` more clever by stating something like:
>>
>>
>> bool has_pinned_objects() const {
>> return pinned_count() >
On Mon, 30 Oct 2023 13:41:02 GMT, Thomas Schatzl wrote:
>> src/hotspot/share/gc/g1/heapRegion.cpp line 734:
>>
>>> 732: // ranges passed in here corresponding to the space between live
>>> objects, it is
>>> 733: // possible that there is a pinned object that is not any more
>>> referenced
> The JEP covers the idea very well, so I'm only covering some implementation
> details here:
>
> * regions get a "pin count" (reference count). As long as it is non-zero, we
> conservatively never reclaim that region even if there is no reference in
> there. JNI code might have references to i