3 ms·
Exceptions are great! Some years ago I wrote a whole essay defending them from this sort of argument: https://blog.plan99.net/what-s-wrong-with-exceptions-noth
by mike_hearn 3y ago
Exceptions are great! Some years ago I wrote a whole essay defending them from this sort of argument:
https://blog.plan99.net/what-s-wrong-with-exceptions-nothing-cee2ed0616 https://blog.plan99.net/what-s-wrong-with-exceptions-nothing...
- vips7L 3y agoMike do you have any more details on this: > HotSpot will do things like recompile methods on the fly to disable stack trace generation, if profiling shows that your code is throwing and catching exceptions way more often than expected I was under the impression that to get good performance here you had to override getStackTrace.
- mike_hearn 3y agoSee https://yoshihisaonoue.wordpress.com/2021/02/07/jvm-option-xx-omitstacktraceinfastthrow/ https://yoshihisaonoue.wordpress.com/2021/02/07/jvm-option-x...
- vips7L 3y agoThanks! Looks like the linked source file doesn’t exist on master. I’ll have to see if I can track it down when I have some more time.
- mike_hearn 3y agoThe list is here: https://github.com/openjdk/jdk/blob/6d5699617ff0985104a8bb5f2c9eb8887cb0961e/src/hotspot/share/opto/graphKit.cpp#L562 https://github.com/openjdk/jdk/blob/6d5699617ff0985104a8bb5f...