RFR: 8271951: Consolidate preserved marks overflow stack in SerialGC
Kim Barrett
kbarrett at openjdk.java.net
Tue Aug 10 04:25:29 UTC 2021
On Thu, 5 Aug 2021 14:29:09 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> In SerialGC we put preserved marks in space that we may have in the young gen, and failing that, we push it to an overflow stack. The overflow stack is actually two stacks, and replicate behavior of the in-place preserved marks. These can be consolidated.
>
> Testing:
> - [x] tier1
> - [ ] tier2
> - [x] hotspot_gc
Looks good. Just the question about PreservedMark::init.
src/hotspot/share/gc/serial/markSweep.hpp line 203:
> 201: PreservedMark(oop obj, markWord mark) : _obj(obj), _mark(mark) {}
> 202:
> 203: void init(oop obj, markWord mark) {
Do we even need this `init` function anymore? Even if such an assignment is still needed, it could just use assignment from a newly constructed object, e.g. `pm = PreservedMark(obj, mark);`. The only place I found where it is used is preserve_marks, which can use the assignment form instead.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5022
More information about the hotspot-gc-dev
mailing list