RFR: 8329529: Serial: Move _saved_mark_word out of ContiguousSpace [v2]

Guoxiong Li gli at openjdk.org
Thu Apr 4 06:51:39 UTC 2024


On Wed, 3 Apr 2024 12:37:05 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>> 
>>  - Remove saved mark word of eden-space and from-space.
>>  - Merge branch 'master' into SAVED_MARK_WORD
>>  - Set saved mark word out of oop iteration.
>>  - JDK-8329529
>
> src/hotspot/share/gc/serial/defNewGeneration.hpp line 143:
> 
>> 141:   // Saved mark word
>> 142:   HeapWord* _eden_saved_mark_word;
>> 143:   HeapWord* _from_saved_mark_word;
> 
> Are they really needed? I'd expect `saved_mark_word` to be useful only for copy-destination, i.e. to-space and old-gen.

Before, I tried to keep the previous meaning and didn't delete the existing code.

The `save_mark_word` of eden-space and from-space only influence the assertment. I removed them just now.

> src/hotspot/share/gc/serial/generation.hpp line 230:
> 
>> 228:   } while (t < space->top());
>> 229: 
>> 230:   *saved_mark_word = space->top();
> 
> Pre-existing: I kind of feel this "write" action doesn't belong to this method; accessing the saved-mark-word makes more sense to be in the caller, IMO.

Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18603#discussion_r1551021757
PR Review Comment: https://git.openjdk.org/jdk/pull/18603#discussion_r1551021682


More information about the hotspot-gc-dev mailing list