Closed Bug 759894 Opened 12 years ago Closed 11 years ago

We sometimes fall into the SlowCallFromIC code path needlessly

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

(Whiteboard: [js:inv:p3])

I've seen things like the below in my profiles:

https://gist.github.com/2838960

The js function which calls bindTexture looks roughly like this:

function f(...) {
  var x = typedArray[offset1];
  var y = regularArray[offset2];
  webGLContext.bindTexture(x, y);
}

It's not clear to me why this function should fall into the SlowCall case, but I was wondering if there is a way to make it not do that?

(Note that I'm treading in unknown territory, so this bug report may not make a lot of sense!)
Are you sure it's the bindTexture call? The stack trace points to a scripted call (InvokeKernel calls RunScript instead of CallJSNative).
It's most likely the call to |f| itself that's slow. |f| then runs in the methodjit and calls bindTexture.

The only way to end up in SlowCallFromIC is if we disabled a call IC (CallCompiler::disable in MonoIC.cpp). Finding out where we call CallCompiler::disable would help. Or if you have a testcase I can take a look.
Blocks: WebJSPerf
Whiteboard: [js:inv:p3]
Ehsan, with the removal of JM a while ago, SlowCallFromIC is gone.

Do you have any testcases where you saw this that are still slow? Should we close this bug?
Flags: needinfo?(ehsan)
I filed this bug over a year ago, I don't think it's actionable any longer.  Let's hope that the problem was fixed somehow.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(ehsan)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.