Register output in assert case useful?
dean.long at oracle.com
dean.long at oracle.com
Thu Oct 26 19:00:33 UTC 2017
On 10/26/17 6:37 AM, Thomas Stüfe wrote:
> Hi all,
>
> when an assert happens, one does not have an ucontext_t and hence no
> register context - that is why hs-err files generated by an assert do not
> contain registers.
>
> But sometimes there are cases where it would be useful to know the content
> of registers at assert - e.g. to know the current stack depth, or because
> remnants in registers may help with investigating.
>
> At SAP we added a small feature to retrieve the current context when an
> assert happens and make that part of the hs-err file. Works similar to the
> SafeFetch logic: when an assert happens, we trigger a segfault and in the
> signal handler we squirrel the ucontext away, before continuing with error
> reporting. We do this right after the assert condition was evaluated, so
> this is as close to the assert point as possible (basically, just a read
> access which is part of the assert macro).
>
> I wonder whether there is interest in us contributing this?
+1
dl
> Kind Regards, Thomas
More information about the hotspot-runtime-dev
mailing list