RFR: 8315462: [REDO] runtime/NMT/SummarySanityCheck.java failed with "Total committed (MMMMMM) did not match the summarized committed (NNNNNN)" [v2]

Afshin Zafari azafari at openjdk.org
Wed Oct 18 10:03:04 UTC 2023


On Wed, 18 Oct 2023 09:01:27 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>> 
>>  - Merge branch 'master' into _8315462
>>  - 8315462: [REDO] runtime/NMT/SummarySanityCheck.java failed with "Total committed (MMMMMM) did not match the summarized committed (NNNNNN)"
>
> src/hotspot/share/services/mallocTracker.cpp line 76:
> 
>> 74:   }
>> 75:   // ThreadCritical is used only for Virtual Memory de-/allocations.
>> 76:   // So, it is possible that concurrent malloc/free happened during the copy to snapshot.
> 
> I'd shorten this to something like "malloc counters may be updated concurrently", that's succinct enough. Also, we may switch to mutexes at some point, like we should, then this commend would be outdated.

Nice!. Thanks! Done.

> src/hotspot/share/services/mallocTracker.cpp line 79:
> 
>> 77:   if (s->_all_mallocs.size() != total_size || s->_all_mallocs.count() != total_count) {
>> 78:     s->_all_mallocs.set_size_and_count(total_size, total_count);
>> 79:   }
> 
> Why just not do it unconditionally?

Yes. Changed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16237#discussion_r1363589099
PR Review Comment: https://git.openjdk.org/jdk/pull/16237#discussion_r1363589599


More information about the hotspot-runtime-dev mailing list