RFR: 8264223: CodeHeap::verify fails extra_hops assertion in fastdebug test [v3]
lucy at openjdk.java.net
Thu Apr 1 09:58:34 UTC 2021
On Thu, 1 Apr 2021 08:01:16 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Hui Shi has updated the pull request incrementally with one additional commit since the last revision:
>> update copyright year
> It looks fine. But I have a question: are we reasonably sure that `extra_hops <= _fragmentation_count` always. More specifically, when `_fragmentation_count` drops to `0`, are `extra_hops` guaranteed to be `0` as well?
@shipilev Short answer: yes.
_fragmentation_count is incremented every time the segment map becomes _potentially_ more fragmented by introducing an additional chunk, see mark_segmap_as_used(). Therefore, _fragmentation_count overestimates the actual segmap fragmentation.
Once _fragmentation_count hits the limit, defragmentation is triggered (defrag_segmap(true)) and the counter is set to zero. After defragmentation, segmap should not contain any extra hops - that's the purpose of defragmentation. If is does, I would classify that as a bug.
More information about the hotspot-compiler-dev