The call stack sampling in JFR is protected from crashing the VM by using `os::ThreadCrashProtection` [1]. AsyncGetCallTrace should also be secured in non-assertion mode using the same technique. This would prevent calling AsyncGetCallTrace from crashing the VM in the event of an error.
The preconditions of `os::ThreadCrashProtection` hold for AsyncGetCallTrace as good as they hold for JFR sampling, as both share most of their code.
[1] https://github.com/openjdk/jdk/blob/965ea8d9cd29aee41ba2b1b0b0c67bb67eca22dd/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp#L166
The preconditions of `os::ThreadCrashProtection` hold for AsyncGetCallTrace as good as they hold for JFR sampling, as both share most of their code.
[1] https://github.com/openjdk/jdk/blob/965ea8d9cd29aee41ba2b1b0b0c67bb67eca22dd/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp#L166
- links to
-
Review openjdk/jdk/8225