Closed Bug 860239 Opened 11 years ago Closed 11 years ago

IonMonkey: Handle OSR pc mismatches better

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
If a script has multiple loops, and we Ion-compile a script with an OSR-entry block for one of them, we can no longer enter the script at another loop. This means we can be stuck in Baseline if we don't hit the first loop again.

The attached patch adds a counter to IonScript and increments it whenever this happens. If it reaches 6000 it invalidates the script. 6000 is pretty high, but lower values regress audio-fft from 70 to 77 ms, and I think this is fine for now to avoid the pathological cases: the patch improves the AWFY-assorted Emscripten misc-skinning benchmark from 6000 to ~500 ms, a 12x improvement.
Attachment #735704 - Flags: review?(bhackett1024)
Comment on attachment 735704 [details] [diff] [review]
Patch

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

::: js/src/ion/IonCode.h
@@ +238,5 @@
>  
>      // Identifier of the compilation which produced this code.
>      types::RecompileInfo recompileInfo_;
>  
> +    uint32_t osrPcMismatchCounter_;

This field should have a short comment.
Attachment #735704 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/3e2e383695cf
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: