We sometimes fall into the SlowCallFromIC code path needlessly

RESOLVED INCOMPLETE

Status

()

RESOLVED INCOMPLETE
7 years ago
5 years ago

People

(Reporter: Ehsan, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:inv:p3])

(Reporter)

Description

7 years ago
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: 579390
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)
(Reporter)

Comment 4

5 years ago
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
Last Resolved: 5 years ago
Flags: needinfo?(ehsan)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.