js::irregexp::InterpretCode started showing up in Speedometer profiles

RESOLVED FIXED in Firefox 57

Status

()

Core
JavaScript Engine
RESOLVED FIXED
18 days ago
8 days ago

People

(Reporter: bas, Assigned: jandem)

Tracking

(Blocks: 1 bug)

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

18 days ago
Since updating my tree yesterday I'm seeing js::irregexp::InterpretCode<char16_t> show up in my Speedometer profiles.. I don't recall seeing this show up on my tree from last week tuesday. This may be nothing, but filing for good measure.
(Assignee)

Comment 1

18 days ago
We should figure out why we're interpreting this regular expression instead of jitting it.
Blocks: 1245279
(Assignee)

Comment 2

18 days ago
(In reply to Jan de Mooij [:jandem] from comment #1)
> We should figure out why we're interpreting this regular expression instead
> of jitting it.

I have a lot on my plate atm, but if someone wants to look into this: I'd break in InterpretCode, then dump the JS stack, then look at the top JS frame. The JS code there should then tell us more about the regular expression we're executing.

It would be great to have a minimal testcase.
(Assignee)

Comment 3

15 days ago
Created attachment 8893785 [details] [diff] [review]
Patch

This is pretty silly: we trigger a lot of non-urgent interrupts, most of them for finished off-thread Ion compilations, and this will often kick us out of the irregexp JIT into the irregexp interpreter (because the irregexp interpreter can deal with interrupts).

I don't think there's a reason to interrupt irregexp JIT code for non-urgent interrupts, so this patch adds JSContext::interruptRegExpJit_, a flag that behaves like interrupt_ but is only set for urgent interrupts.

This eliminates all regexp-jit interrupts on Speedometer and should keep us out of the interpreter.
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Attachment #8893785 - Flags: review?(bhackett1024)
Comment on attachment 8893785 [details] [diff] [review]
Patch

Review of attachment 8893785 [details] [diff] [review]:
-----------------------------------------------------------------

Nice!
Attachment #8893785 - Flags: review?(bhackett1024) → review+

Comment 5

14 days ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/57bea3a4495a
Don't interrupt regexp JIT code for non-urgent interrupts. r=bhackett
https://hg.mozilla.org/mozilla-central/rev/57bea3a4495a
Status: ASSIGNED → RESOLVED
Last Resolved: 13 days ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.