Closed Bug 637856 Opened 15 years ago Closed 14 years ago

TypeInference: tracer integration

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bhackett1024, Unassigned)

References

Details

Attachments

(1 file, 7 obsolete files)

Currently, enabling type inference disables the tracer. Fixing this should not be hard, the main problem is making sure that any code which is traced has been analyzed by inference, and that unexpected dynamic behavior (integer overflows, accessing missing properties) gets reported properly. This is separate from the issue of having the tracer actually use inference results (which requires a mechanism to discard traces after type information has changed).
Attached patch Tracer feedback to inference (obsolete) — Splinter Review
Imacros don't correctly propagate information back to inference. This patch attempts to fix the types after the imacro has finished executing.
The tracer never runs without having gone through the interpreter at least once during recording, so during that phase inference is ensured to run. Currently the tracer has side exits on specialized types already, and when it bails out it *re-executes* the bytecode that caused the guard to fail. This re-execution should propagate correct type information. The question is: are there cases where the tracer does not bail out on its type assumptions but there are still inference-observable changes to existing types? I can't find any, but maybe bhackett can weigh in on this.
Fixes incorrect emitted code from the recorder for |JSOP_NEWINIT| and |JSOP_NEWOBJECT|
Attachment #543310 - Attachment is obsolete: true
(In reply to comment #2) > The tracer never runs without having gone through the interpreter at least > once during recording, so during that phase inference is ensured to run. > > Currently the tracer has side exits on specialized types already, and when > it bails out it *re-executes* the bytecode that caused the guard to fail. > This re-execution should propagate correct type information. > > The question is: are there cases where the tracer does not bail out on its > type assumptions but there are still inference-observable changes to > existing types? > > I can't find any, but maybe bhackett can weigh in on this. I don't think there will be much to worry about here, most of the side exits the tracer takes are testing information we know about statically, and the additional dynamic type results (like integer overflow) should throw things off trace already. Type barriers need to be tested when in place, which will introduce new side exits but should be OK if the op was side effect free. Also, type changes will be able to throw things off trace at different points in the VM than was possible previously, I don't know if this will cause problems.
Updated against new TM merge in JM
Attachment #543381 - Attachment is obsolete: true
Attachment #543565 - Attachment is obsolete: true
Attached patch Packed dense array fixes (obsolete) — Splinter Review
Attached patch Null closure creation fix (obsolete) — Splinter Review
Still a bunch more failures to go -- perhaps this bug should be split?
Attached patch v1 wipSplinter Review
This patch makes all jit-tests pass with -n -a -j on JM:74432. It also includes a patch to not capture types of dead slots.
Attachment #544994 - Attachment is obsolete: true
Attachment #544995 - Attachment is obsolete: true
Attachment #544996 - Attachment is obsolete: true
Attachment #544997 - Attachment is obsolete: true
Is this WONTFIX now?
I believe so -- the tracer should be slated for removal.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Depends on: 703132
No longer depends on: 703132
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: