-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
[Truffle] Limit the number of methods available for runtime compilation #3226
Conversation
Removing this keeps printStackTrace from being inlined during compilation. An ArrayIndexOutOfBoundsException will still be thrown in the case of an invalid index.
This change lowers the number of methods available for runtime compilation from over 33,000 to less than 15,000. Some methods that could not be annotated with TruffleBoundary were split in order to introduce a boundary.
These all seem fine. |
[Truffle] Limit the number of methods available for runtime compilation
@@ -114,6 +115,7 @@ public BacktraceNode(RubyContext context, SourceSection sourceSection) { | |||
readCustomBacktrace = new ReadHeadObjectFieldNode("@custom_backtrace"); | |||
} | |||
|
|||
@TruffleBoundary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asRubyStringArray()
should probably be the boundary, the rest should not have too many nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, the tool shows that asRubyStringArray is the method that makes a lot reachable for compilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll fix on master 😃
It is a bit unfortunate that |
|
And with that I forgot: |
@chrisseaton if we get in |
This pull request lowers the number of methods available for runtime
compilation from over 33,000 to less than 15,000. Some methods that
could not be annotated with TruffleBoundary were split in order to
introduce a boundary.
I used a static analysis tool to determine what methods were causing a large number of other methods to be included for runtime compilation and added Truffle boundaries to limit this.