RFR: JDK-8296907: VMError: add optional callstacks, siginfo for secondary errors [v3]
Thomas Stuefe
stuefe at openjdk.org
Thu Nov 17 08:40:03 UTC 2022
On Wed, 16 Nov 2022 17:34:44 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Merge branch 'JDK-8296907-VMError-add-optional-callstacks-siginfo-for-secondary-errors' of github.com:tstuefe/jdk into JDK-8296907-VMError-add-optional-callstacks-siginfo-for-secondary-errors
>> - Feedback David
>
> src/hotspot/share/utilities/vmError.cpp line 1641:
>
>> 1639: _current_step_info, id);
>> 1640: if (os::exception_name(id, tmp, sizeof(tmp))) {
>> 1641: st->print(", %s (0x%x) at pc=" PTR_FORMAT, tmp, id, p2i(pc));
>
> Not really relevant for this PR. But do not like the inconsistency that the id is printed as hex here, decimal in os::print_siginfo for posix, and hex in os::print_siginfo for windows.
I think the whole concept of VMError::id is not that good. It holds either SEH codes (windows), signal numbers or some enum we ourselves define. So it combines several orthogonal things, and the encoding is not clear. I have several half-done patches laying around cleaning it up, but never got around to finish them. I think some hierarchical structure would be better, e.g. errortype="crash|assert|oom", with auxilliary information depending on errortype attached. The encoding can be as dense as a 32-bit value, if one wanted. But that would also sort the printing problem, since printing depends on what the id is in the first place (e.g. signals are usually printed with d, but SEH codes as 32bit hex).
-------------
PR: https://git.openjdk.org/jdk/pull/11118
More information about the hotspot-dev
mailing list