Closed
Bug 1212183
Opened 10 years ago
Closed 10 years ago
Global lexicals regressed dromaeo DOM real bad
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla44
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | fixed |
People
(Reporter: shu, Assigned: shu)
References
Details
Attachments
(1 file)
|
6.15 KB,
patch
|
jandem
:
review+
bzbarsky
:
feedback+
|
Details | Diff | Splinter Review |
I regressed Dromaeo DOM real bad in bug 589199 by 20% [1]. I'm suspecting it's some buggy code to do with optimizing global name accesses that happen to be DOM getters. Will investigate.
[1] http://graphs.mozilla.org/graph.html#tests=[[73,131,35]]&sel=1444082271000,1444255071000&displayrange=7&datatype=geo
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → shu
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8670597 [details] [diff] [review]
Fix DOM getter optimizations in the JITs
Review of attachment 8670597 [details] [diff] [review]:
-----------------------------------------------------------------
So I don't know these DOM optimizations real well. Are there other places that need to be updated?
Attachment #8670597 -
Flags: review?(jdemooij)
Attachment #8670597 -
Flags: feedback?(bzbarsky)
Comment 3•10 years ago
|
||
Comment on attachment 8670597 [details] [diff] [review]
Fix DOM getter optimizations in the JITs
Argh. This stuff is all so fragile... :(
For UpdateExistingGetPropCallStubs is globalLexical really the right receiver? Seems weird and at least worth documenting.
Past that, I think you got everything, assuming "CallNativeGlobal" is the only new IC stub that got added that's relevant for gets/sets on the global.
Attachment #8670597 -
Flags: feedback?(bzbarsky) → feedback+
| Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #3)
> Comment on attachment 8670597 [details] [diff] [review]
> Fix DOM getter optimizations in the JITs
>
> Argh. This stuff is all so fragile... :(
>
> For UpdateExistingGetPropCallStubs is globalLexical really the right
> receiver? Seems weird and at least worth documenting.
>
Yeah, it's subtle and worth documenting. It's the receiver only for the sake of the stub generating a shape guard for it. The weirdness is because we need to guard 3 things:
1. The global lexical scope shape, since it can shadow. Done via receiver because at the point of GETGNAME, the global lexical scope is the scope chain and in the receiver register.
2. The holder shape. Done via holder per normal.
3. The global object shape. Done via a manually-generated shape check.
| Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Shu-yu Guo [:shu] from comment #4)
> (In reply to Boris Zbarsky [:bz] from comment #3)
> > Comment on attachment 8670597 [details] [diff] [review]
> > Fix DOM getter optimizations in the JITs
> >
> > Argh. This stuff is all so fragile... :(
> >
> > For UpdateExistingGetPropCallStubs is globalLexical really the right
> > receiver? Seems weird and at least worth documenting.
> >
>
> Yeah, it's subtle and worth documenting. It's the receiver only for the sake
> of the stub generating a shape guard for it. The weirdness is because we
> need to guard 3 things:
>
> 1. The global lexical scope shape, since it can shadow. Done via receiver
> because at the point of GETGNAME, the global lexical scope is the scope
> chain and in the receiver register.
> 2. The holder shape. Done via holder per normal.
> 3. The global object shape. Done via a manually-generated shape check.
Worth to note also that in the case of the holder == global object, we generate a superfluous check. I haven't bothered to optimize this away yet.
Comment 6•10 years ago
|
||
Comment on attachment 8670597 [details] [diff] [review]
Fix DOM getter optimizations in the JITs
Review of attachment 8670597 [details] [diff] [review]:
-----------------------------------------------------------------
I'll be refactoring IC code the coming weeks, let me know if you (or bz) have ideas to make this better.
Attachment #8670597 -
Flags: review?(jdemooij) → review+
Comment 7•10 years ago
|
||
On bug 589199 I forgot to say that the patch also regressed sunspider-partial-sums by 46%. Same problem as on Dromaeo?
| Assignee | ||
Comment 8•10 years ago
|
||
(In reply to Guilherme Lima from comment #7)
> On bug 589199 I forgot to say that the patch also regressed
> sunspider-partial-sums by 46%. Same problem as on Dromaeo?
No, not the same as this one. That one might be unavoidable for now.
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/5bc4d467648c for mass bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=15347554&repo=mozilla-inbound
Flags: needinfo?(shu)
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment 13•10 years ago
|
||
should this be reopened? it was backed out and then closed. The perf regression from talos was fixed temporarily and now it is back to the regressed state.
Comment 14•10 years ago
|
||
The backout was comment 10, of the landing in comment 9. Then comment 11 does a relanding with the failing assert adjusted, which was merged around (comment 12).
That said, the relanding seems to be missing the nice "The CallNativeGlobal stub needs to generate 3 shape checks" comment for some reason?
| Assignee | ||
Comment 15•10 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #14)
> The backout was comment 10, of the landing in comment 9. Then comment 11
> does a relanding with the failing assert adjusted, which was merged around
> (comment 12).
>
> That said, the relanding seems to be missing the nice "The CallNativeGlobal
> stub needs to generate 3 shape checks" comment for some reason?
Ugh, good catch. I'll fix this in a bit.
Flags: needinfo?(shu)
Comment 16•10 years ago
|
||
Comment 17•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•