RFR: 8341334: CDS: Parallel relocation [v7]

Thomas Stuefe stuefe at openjdk.org
Wed Nov 6 12:57:29 UTC 2024


On Wed, 6 Nov 2024 11:44:43 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/cds/filemap.cpp line 1972:
>> 
>>> 1970:     BitMap::idx_t size  = bm->size();
>>> 1971:     BitMap::idx_t start = MIN2(size, size * chunk / max_chunks);
>>> 1972:     BitMap::idx_t end   = MIN2(size, size * (chunk + 1) / max_chunks);
>> 
>> Can you assert here that `(end - start) > 1`? Should never happen with the limited number of workers, but it would be nice to know. E.g. if someone changes the number of workers again.
>> 
>> If it were to happen, the effect would be that we silently skip relocation. Better to fall over this early.
>
> Shouldn't it be `assert(end > start)` instead? I.e. check we never actually get empty slices.

Yes. I meant > 0.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21302#discussion_r1830972021


More information about the hotspot-runtime-dev mailing list