RFR: 8234534: Simplify CardTable code after CMS removal

Albert Mingkun Yang ayang at openjdk.java.net
Thu Feb 4 10:15:41 UTC 2021


On Tue, 2 Feb 2021 15:13:38 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi,
> 
>   can I have reviews for this cleanup that removes CMS specific code from `CardTable/CardTableRS`?
> 
> Note that there is still this "conc_scan" parameter passed to the card table that affects barrier code generation, for some reason also G1 barrier code generation although it should not as `G1CardTable::scanned_concurrently()` only used for the "normal" card table. Initial attempts showed that removing this is not straightforward, causing crashes and so I left it out for [JDK-8250941](https://bugs.openjdk.java.net/browse/JDK-8260941) so that this change is solely about removing unused code.
> 
> Testing: tier1-4, some tier1-5 runs earlier (before some removal of hunks for files only containing copyright updates or newline changes)

Marked as reviewed by ayang (Author).

src/hotspot/share/gc/shared/cardTableRS.cpp line 442:

> 440:   CardTable(whole_heap, scanned_concurrently) { }
> 441: 
> 442: CardTableRS::~CardTableRS() { }

Now that it's empty, is it possible to remove it completely?

src/hotspot/share/gc/shared/cardTableRS.hpp line 55:

> 53:   virtual void verify_used_region_at_save_marks(Space* sp) const NOT_DEBUG_RETURN;
> 54: 
> 55:   void inline_write_ref_field_gc(void* field, oop new_val) {

It seems that the arg `new_val` is not used. Maybe remove it or add a comment saying it's an intentional omission.

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

PR: https://git.openjdk.java.net/jdk/pull/2354



More information about the hotspot-gc-dev mailing list