RFR: 8358735: GenShen: block_start() may be incorrect after class unloading [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Thu Nov 6 23:52:05 UTC 2025


On Fri, 3 Oct 2025 20:47:16 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix idiosyncratic formatting
>
> src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp line 663:
> 
>> 661:   // we expect that the marking context isn't available and the crossing maps are valid.
>> 662:   // Note that crossing maps may be invalid following class unloading and before dead
>> 663:   // or unloaded objects have been coalesced and filled (updating the crossing maps).
> 
> Good comment!
> 
> What's still not clear is why `tams` and `last_relevant_card_index` are passed here. Does it reduce the work in the caller? I'd expect this to just return the first object on the card index or null if no such object exists. I realize `ctx` is used when one must consult the marking context in preference to the "crossing maps". The relevance of the last 2 arguments isn't clear from this documentation comment.
> 
> May be I'll see why these are passed in when I look at the method definition, but I suspect there may be some leakage of abstraction & functionality here between caller and callee.

Thanks for identifying this "confusion".  I'm making an attempt to improve documentation for this comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27353#discussion_r2501237330


More information about the hotspot-gc-dev mailing list