RFR: JDK-8255884: Metaspace: chunk local commit counter may be stale [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Thu Dec 3 12:23:59 UTC 2020
On Thu, 3 Dec 2020 00:02:50 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Merge
>> - Add gtest for Vsn::is_range_fully_committed
>> - Initial
>
> src/hotspot/share/memory/metaspace/metachunk.cpp line 185:
>
>> 183: for (Metachunk* c = prev_in_vs(); c != NULL && c->base() >= granule_start; c = c->prev_in_vs()) {
>> 184: assert(c->committed_words() == 0, "neighbor was already committed?");
>> 185: c->_committed_words = c->word_size();
>
> Can the previous metachunk be partially contained in the commit granule? ie c->base < granule_start but c->end >= granule start?
No. A chunk smaller than a granule is fully contained in one granule; a chunk larger than a granule contains only full granules.
Which is inbuilt since both chunks and granules are pow2 values, and start at addresses aligned to their size.
But just to make things very explicit I'll add an assert for this.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1291
More information about the hotspot-runtime-dev
mailing list