RFR: 8265450: Merge PreservedMarksSet::restore code paths

Thomas Schatzl tschatzl at openjdk.java.net
Wed Apr 21 15:52:34 UTC 2021


On Tue, 20 Apr 2021 11:26:58 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> src/hotspot/share/gc/shared/preservedMarks.cpp line 100:
>> 
>>> 98:   volatile size_t _total_size;
>>> 99: #ifdef ASSERT
>>> 100:   size_t _total_size_before;
>> 
>> I know `_total_size` is what was used before, but what do you think about changing it to `_total_count` now when we are touching it.
>
> Should we rename `size` to `count` all the way through? Also `PreservedMarks` uses `size`, and that is where this comes from. There are likely other places where we use `size` instead of `count` (or `num`, depending on when the code has been written the first time).
> Not sure this is the appropriate CR to do that, but not against it either.

I decided to keep this kind of renaming out of this CR. We can discuss this offline and file an issue that I can look at.

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

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



More information about the hotspot-gc-dev mailing list