Bug 167811
| Summary: | OSR entry: try making the entry trigger a patchable nop instead of a branch | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | JF Bastien <jfbastien> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | ASSIGNED | ||
| Severity: | Normal | CC: | fpizlo, jfbastien, keith_miller, mark.lam, msaboff, saam |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 167149 | ||
| Bug Blocks: | |||
JF Bastien
Each loop has a jitCode->tierUpEntryTriggers which is checked by DFG code. When zero it's a nop, when non-zero it forces entry to tierUpCommon. After 167149 it can become non-zero in two ways:
* Code is done compiling.
* tierUpCommon decides that it wants to force compilation, but at a different location than the current one.
In both cases, we could avoid the branch in DFG code if we had a patchable nop instead. We could pass a "reason" argument when we patch which explains how we got there.
Maybe we can even just squash the counter check instead? And why do we have one counter per function, instead of one per location (I have an idea why, but it's worth understanding)? I could look into that too.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |