Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple adjustments to the Exception and raise logic. #5607

Merged
merged 5 commits into from Feb 12, 2019

Conversation

@headius
Copy link
Member

@headius headius commented Feb 12, 2019

  • 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.

Fixes #5605.

@headius headius added this to the JRuby 9.2.7.0 milestone Feb 12, 2019
headius added 2 commits Feb 12, 2019
* 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.

Fixes jruby#5605.
@headius headius force-pushed the improve_raise_logic branch from f11adc0 to ec4a8f3 Feb 12, 2019
@headius headius requested review from kares and enebo Feb 12, 2019
enebo
enebo approved these changes Feb 12, 2019
@headius
Copy link
Member Author

@headius headius commented Feb 12, 2019

The three failures are the same three from master's -ea hang in MRI suite. I'm investigating that on master.

@headius headius merged commit 0b60847 into jruby:master Feb 12, 2019
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@headius headius deleted the improve_raise_logic branch Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants