Since JDK-8014555, G1 post-barrier contains a StoreLoad barrier between the oop store and the card mark load. This is required to maintain the proper memory ordering in the face of conditional card mark updates. However, in some cases that barrier gets into the way. While it is an open question if we can optimize the barrier itself out, it makes sense to make G1 respond to UseCondCardMark, and thus provide the ability for users to avoid the barrier by disabling conditional card marks. (Hoping that pre-checks in G1 post-barrier filter enough card mark updates). UseCondCardMark is disabled by default, but we can turn enable it by default with UseG1GC, so that the default behavior is the same.
|