RFR: 8353115: GenShen: mixed evacuation candidate regions need accurate live_data [v2]

William Kemper wkemper at openjdk.org
Wed Apr 9 17:53:31 UTC 2025


On Wed, 9 Apr 2025 17:02:40 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> This is a good idea.  Let me experiment with this.
>
> My experiment with an initial attempt at this failed with over 60 failures.  The "problem" is that we often consult get_live_data() in contexts from which it is "not appropriate" to add (top- TAMS) to the atomic volatile ShenandoahHeapRegion::_live_data() .  I think most of these are asserts.  I have so far confirmed that there are at least two different places that need to be fixed.  Not sure how many total scenarios.
> 
> I'm willing to move forward with changes to the failing asserts to make this change work.  I think the code would be cleaner with your suggested refactor.  It just makes this PR a little more far-reaching than the original.
> 
> See the most recent commit on this PR to see the direction this would move us.  Let me know if you think I should move forward with more refactoring, or revert this most recent change.
> 
> Thanks.

It does look simpler. Do you have an example of one of the failing asserts? 

One thing I hadn't considered is how "hot" `ShenandoahHeapRegion::get_live_data_words` is. Is there going to be a significant performance hit if we make this method do more work? It does look like this method is called frequently.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24319#discussion_r2035852703


More information about the hotspot-gc-dev mailing list