RFR: 8274986: max code printed in hs-err logs should be configurable [v5]
David Holmes
dholmes at openjdk.java.net
Tue Oct 12 11:45:59 UTC 2021
On Tue, 12 Oct 2021 08:28:07 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> This PR adds a `ErrorLogPrintCodeLimit` (develop) option for configuring the amount of code printed in a hs-err log file. There's a hard limit of 10 so that the buffer used to avoid duplicates in `VMError::print_code` is stack allocated.
>> In addition, the Java stack is also scanned when considering code to print as the native stack may not have any Java compiled frames. For example, a transition into the VM through a RuntimeStub can prevent the native stack walk from seeing the frames above the stub.
>> The MachCodeFramesInErrorFile test has been made more robust in terms of validating its expectations of how C2 intrinsifies methods.
>>
>> There's one other minor change to address [this comment](https://github.com/openjdk/jdk/pull/5446#issuecomment-938518814).
>
> Doug Simon has updated the pull request incrementally with two additional commits since the last revision:
>
> - clarify need for defensive code
> - grammar fix
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5875
More information about the hotspot-dev
mailing list