RFR: JDK-8293313: NMT: Rework MallocLimit [v4]

Thomas Stuefe stuefe at openjdk.org
Fri Jan 27 06:20:19 UTC 2023


On Thu, 26 Jan 2023 17:25:26 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> I prefer MallocLimit, short and snappy. And the fact that NMT is supervising the limit is an implementation detail. It used to be different with MallocMaxTestWords and may be different in the future.
>
> Still, you named the test file `test/hotspot/gtest/nmt/test_nmt_malloclimit.cpp`, not `test/hotspot/gtest/nmt/test_malloclimit.cpp` :-)

I'm not perfect :-) honestly, I just like short, easy to remember and to talk about command line names. I dislike the JVM tradition of long camel-cased names a bit.

>>> Why did we bother to wrap `VMError::is_error_reported()` into `suppress_limit_handling()`?
>>> 
>> 
>> Because during error handling, code may malloc() too (bad practice, but it can happen). If it does, I don't want circular assertions to fire; I want a clean, complete hs-err file.
>> 
>>> Are you anticipating more exclusions here in the future?
>> 
>> None I can think of.
>
> That explains why we want to call `VMError::is_error_reported()` sure, but not why we wrapped it in `suppress_limit_handling()` SPI, unless I am missing something?

Oh okay. This was mostly a documentation thing. I can remove the wrapper.

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

PR: https://git.openjdk.org/jdk/pull/11371


More information about the hotspot-dev mailing list