Closed Bug 1552348 Opened 5 years ago Closed 9 months ago

Investigate if canceling ion compilation because of GC adds noise to Speedometer and elsewhere, and if so, figure out how to not cancel ion.

Categories

(Core :: JavaScript Engine: JIT, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Performance Impact low

People

(Reporter: smaug, Unassigned)

References

Details

Depends on: 1373723

One idea would be to compute the average/X-percentile/max/1.5x-max of the heap-increase across Ion compilation, and store it in a JSRuntime field.

When starting an Ion compilation we can check if adding this value would trigger a GC during the compilation or soon after it. Therefore preventing the compilation until the GC heap is compacted or the heap reserved size is enlarged.

We might as well trigger a GC if our compilation queue is already empty, when checking this GC threshold, as our compilation would be waiting for the GC to happen to do its Ion compilation.

(In reply to Olli Pettay [:smaug] from comment #0)

https://searchfox.org/mozilla-central/rev/94c6b5f06d2464f6780a52f32e917d25ddc30d6b/js/src/jit/IonBuilder.cpp#13895-13898

This nursery case should be rare in practice, but I think it's worth considering removing it. Instead of this we could either:

  1. Deoptimize in IonBuilder when we see a nursery object.
  2. Find a way to support nursery objects. For TypeSets and type constraints what might work is some sort of linked list or Vector we trace on the main thread and assert is never accessed off-thread.
Priority: -- → P3
Whiteboard: [qf] → [qf:p3:responsiveness]
Whiteboard: [qf:p3:responsiveness] → [qf]
Whiteboard: [qf] → [qf:investigate]
Performance Impact: --- → ?
Whiteboard: [qf:investigate]
Performance Impact: ? → P3
Severity: normal → S3

The mechanism highlighted in Comment 1 has been removed; we seem to support some nursery stuff in the warp oracle.

Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.