RFR: 8319376: ParallelGC: Forwarded objects found during heap inspection [v4]
Albert Mingkun Yang
ayang at openjdk.org
Tue Nov 7 14:40:33 UTC 2023
On Tue, 7 Nov 2023 14:31:49 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> See JBS issue for details.
>>
>> Testing:
>> - [x] gc/logging/TestUnifiedLoggingSwitchStress.java -XX:+UseParallelGC
>> - [x] tier1 -XX:+UseParallelGC
>> - [ ] tier2 -XX:+UseParallelGC
>> - [ ] hotspot_gc
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>
> Don't expose forwarded objects during object iteration
src/hotspot/share/gc/parallel/mutableSpace.cpp line 239:
> 237: while (p < top()) {
> 238: oop obj = cast_to_oop(p);
> 239: if (!obj->is_forwarded()) {
Maybe some comment along these lines "When promotion-failure occurs during Young GC, eden/from space is not cleared, so we can encounter objs with "forwarded" markword. They are essentially dead, so skipping them."
src/hotspot/share/gc/parallel/mutableSpace.cpp line 242:
> 240: cl->do_object(cast_to_oop(p));
> 241: }
> 242: p += cast_to_oop(p)->size();
One can use `obj` instead of `cast_to_oop`.
src/hotspot/share/memory/heapInspection.cpp line 216:
> 214: // of running out of space required to create a new entry.
> 215: bool KlassInfoTable::record_instance(const oop obj) {
> 216: assert(!obj->is_forwarded(), "must not be forwarded");
It'd be good if someone more familiar with this method/class can comment whether this assert makes sense in this context.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16494#discussion_r1385018851
PR Review Comment: https://git.openjdk.org/jdk/pull/16494#discussion_r1385014921
PR Review Comment: https://git.openjdk.org/jdk/pull/16494#discussion_r1385020892
More information about the serviceability-dev
mailing list