Specific-arity call paths through compiled code have extraneous stack frames
----------------------------------------------------------------------------
Key: JRUBY-2600
URL: http://jira.codehaus.org/browse/JRUBY-2600
Project: JRuby
Issue Type: Improvement
Components: Compiler
Reporter: Charles Oliver Nutter
Fix For: JRuby 1.1.3
For simple methods with zero, one, two, or three args, the call path is passing
through a default CompiledMethod.call impl:
{noformat}
def foo; foo; end
{noformat}
Stack:
{noformat}
at ruby.__dash_e__.method__0$RUBY$foo(-e:1)
at ruby.__dash_e__Invokermethod__0$RUBY$fooFixed0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.CompiledMethod.call(CompiledMethod.java:48)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:123)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:298)
at ruby.__dash_e__.method__0$RUBY$foo(-e:1)
{noformat}
Here the call method being hit is a default version that does not take a block,
and which passes Block.NULL_BLOCK into the appropriate method.
This is due to us wanting to avoid the compiled handles generating too many
methods, but I believe it would be better for the system if we always either
dispatched through the block-passing path. Measuring block-passing path with
Block.NULL_BLOCK versus non-block-passing needs to be done to see if there's
any degradation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email