RFR: 8319376: ParallelGC: Forwarded objects found during heap inspection [v2]

Albert Mingkun Yang ayang at openjdk.org
Mon Nov 6 17:42:09 UTC 2023


On Mon, 6 Nov 2023 16:27:26 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:
> 
>   Handle self-forwarded objects correctly

I don't get the assertion any more after adding the following to `PSScavenge::clean_up_failed_promotion`:


  ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();

  struct ResetForwardedMarkWord : ObjectClosure {
    void do_object(oop obj) override {
      if (obj->is_forwarded()) {
        obj->init_mark();
      }
    }
  } cl;

  heap->young_gen()->eden_space()->object_iterate(&cl);
  heap->young_gen()->from_space()->object_iterate(&cl);


(Essentially copied from Serial.)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16494#issuecomment-1795627388


More information about the serviceability-dev mailing list