You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by @jeremyevans while improving perf of no-trace flow control exceptions.
The following benchmarks should perform roughly the same. Instead, the one with set_backtrace performs more like a normal exception with a full backtrace.
* Request backtrace from exception object before raise, so that
pre-set backtrace or overridden #backtrace skip native trace
gathering.
* Eliminate some redundant or unused backtrace-gathering methods.
* Fix Kernel#warn uplevel logic to use partial traces (Java 9).
The fixes here allow two additional ways of blunting the cost of
raising an exception (by eliminating the native stack trace):
* Call Exception#set_backtrace before raising
* Use an Exception subtype that overrides Exception#backtrace
This improves the performance of these scenarios to be roughly
equivalent to the three-arg form of Kernel#raise.
Fixesjruby#5605.
* Request backtrace from exception object before raise, so that
pre-set backtrace or overridden #backtrace skip native trace
gathering.
* Eliminate some redundant or unused backtrace-gathering methods.
* Fix Kernel#warn uplevel logic to use partial traces (Java 9).
The fixes here allow two additional ways of blunting the cost of
raising an exception (by eliminating the native stack trace):
* Call Exception#set_backtrace before raising
* Use an Exception subtype that overrides Exception#backtrace
This improves the performance of these scenarios to be roughly
equivalent to the three-arg form of Kernel#raise.
Fixesjruby#5605.
Reported by @jeremyevans while improving perf of no-trace flow control exceptions.
The following benchmarks should perform roughly the same. Instead, the one with
set_backtrace
performs more like a normal exception with a full backtrace.3-argument raise:
set_backtrace:
There's some logic missing in JRuby to avoid generating a backtrace if one is manually set.
The text was updated successfully, but these errors were encountered: