RFR: Card marking write barrier for generational mode.
Bernd Mathiske
bmathiske at openjdk.java.net
Tue Oct 27 12:04:58 UTC 2020
Adding a typical generational card marking write barrier, which is only active in generational mode and has no other effect yet than writing into a card table that is allocated at startup on the side and covers the whole heap as specified by -Xmx.
The code for card marking is copied verbatim from existing shared barrier code. A previous version inherited this code, by making ShenandoahBarrierSet a subclass of CardTableBarrierSet. Now the code pertinent to post write barriers is just copied down instead. This allows adding the new code without any changes to shared code (code that is not specific to Shenandoah).
Initializing the card table in proper sequence comes with slightly rearranging heap initialization. This can be seen near the bottom of the listing here.
Testing: ran the same SPECjvm2008 benchmark programs as before. Performance seems to be 1-1.5% less with card marking active, in average for this kind of benchmark. In non-generational mode, no change observed.
-------------
Commit messages:
- Card marking write barrier for generational mode.
Changes: https://git.openjdk.java.net/shenandoah/pull/5/files
Webrev: https://webrevs.openjdk.java.net/?repo=shenandoah&pr=5&range=00
Stats: 541 lines in 13 files changed: 499 ins; 22 del; 20 mod
Patch: https://git.openjdk.java.net/shenandoah/pull/5.diff
Fetch: git fetch https://git.openjdk.java.net/shenandoah pull/5/head:pull/5
PR: https://git.openjdk.java.net/shenandoah/pull/5
More information about the shenandoah-dev
mailing list