Closed Bug 1386199 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: bas.schouten, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.
We should figure out why we're interpreting this regular expression instead of jitting it.
Blocks: 1245279
(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.
Attached patch PatchSplinter Review
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+
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
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: