RFR: 8279856: Parallel: Use PreservedMarks to record promotion-failed objects
Stefan Johansson
sjohanss at openjdk.java.net
Mon Jan 17 10:24:26 UTC 2022
On Tue, 11 Jan 2022 14:02:20 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple change of using `PreservedMarks` to skip young-gen walking in finding promotion-failed objs.
>
> Test: tier1-6
Looks good.
One think that would be interesting would be to do some measurements on the additional memory usage for the `PreservedMarks` stack with this change. To better understand what kind of memory trade-off we do for the quicker processing.
src/hotspot/share/gc/parallel/psPromotionManager.cpp line 363:
> 361: push_contents(obj);
> 362:
> 363: _preserved_marks->push_always(obj, obj_mark);
I think a comment here explaining that we use the preserved marks no only to preserved "special" marks but also to restore and clear the forwardning pointer in "normal" marks.
src/hotspot/share/gc/shared/preservedMarks.hpp line 60:
> 58: size_t size() const { return _stack.size(); }
> 59: inline void push_if_necessary(oop obj, markWord m);
> 60: inline void push_always(oop obj, markWord m);
Any reason not to just call this `push()` like we had in the past and maybe also re-use it in `push_if_necessary()`?
-------------
Changes requested by sjohanss (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7028
More information about the hotspot-gc-dev
mailing list