OmitStackTraceInFastThrow
经常遇到由于这个参数而导致异常堆栈消失的问题,之前看过一篇blog大概有个映像,这里自己记录一下具体的内容。
可以参见这篇文章里的测试情况
Hotspot caused exceptions to lose their stack traces in production – and the fix
可以看sun官方针对这个的说明
The compiler in the server VM now provides correct stack backtraces for all "cold" built-in exceptions. For performance purposes, when such an exception is thrown a few times, the method may be recompiled. After recompilation, the compiler may choose a faster tactic using preallocated exceptions that do not provide a stack trace. To disable completely the use of preallocated exceptions, use this new flag: -XX:-OmitStackTraceInFastThrow.