Re: RFR: 8318706: Implementation of JDK-8276094: JEP 423: Region Pinning for G1 [v3]

2023-10-30 Thread Thomas Schatzl
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

Re: RFR: 8318706: Implementation of JDK-8276094: JEP 423: Region Pinning for G1 [v3]

2023-10-30 Thread Thomas Schatzl
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() >

Re: RFR: 8318706: Implementation of JDK-8276094: JEP 423: Region Pinning for G1 [v3]

2023-10-30 Thread Thomas Schatzl
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

Re: RFR: 8318706: Implementation of JDK-8276094: JEP 423: Region Pinning for G1 [v3]

2023-10-30 Thread Thomas Schatzl
> 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