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

Gerard Ziemski gziemski at openjdk.org
Wed Jan 25 17:40:48 UTC 2023


On Wed, 25 Jan 2023 06:26:42 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/services/mallocTracker.inline.hpp line 35:
>> 
>>> 33: #include "utilities/vmError.hpp"
>>> 34: 
>>> 35: static inline bool suppress_limit_handling() {
>> 
>> Why did we bother to wrap `VMError::is_error_reported()` into `suppress_limit_handling()`?
>> 
>> Are you anticipating more exclusions here in the future?
>
>> 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?

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

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


More information about the hotspot-dev mailing list