RFR: 8274986: max code printed in hs-err logs should be configurable [v5]

Thomas Stuefe stuefe at openjdk.java.net
Tue Oct 12 16:17:51 UTC 2021


On Tue, 12 Oct 2021 11:55:03 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> src/hotspot/share/utilities/vmError.cpp line 921:
>> 
>>> 919:        // during argument parsing, there's no way to prevent it
>>> 920:        // subsequently (i.e., after parsing) being set to a
>>> 921:        // value outside the range.
>> 
>> This is overly defensive IMO. Flags should never be touched after initialization is complete and we assume we can trust ourselves.
>
> In general I agree but in error reporting code I get extra defensive plus the defensive code is small and not on a hot path.
> That said, I won't object to it being undone in a subsequent PR.

I thought the point of MIN2 here is to handle ErrorLogPrintCodeLimit < max. IMHO ErrorLogPrintCodeLimit > max would be just an assert-worthy error, since as David wrote flag values should not be changed after initialization.

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

PR: https://git.openjdk.java.net/jdk/pull/5875


More information about the hotspot-dev mailing list