Closed Bug 468988 Opened 16 years ago Closed 16 years ago

TM: v3 of dromaeo is slow (due to constant re-numbering of the global object's shape)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b3

People

(Reporter: gal, Assigned: gal)

References

Details

(Keywords: meta, regression)

Dromaeo's test harness keeps re-numbering the shape of the global object by overwriting properties of the global object with newly created lambda functions/constructors (prototype.js:1118). This blocks tracing by constantly flushing the trace cache, but also slows down the interpreter by making the property cache mismatch constantly. There are no easy fixes for this. Is this an intentional and meaningful design pattern the code uses here? This will also negatively impact V8's hidden classes approach (not sure about SFX). Maybe the test harness should be lightweight and it should not interfere with name bindings while it runs tests. In its current form the benchmark essentially measures how well the VM deals with unstable name bindings, and not really the test thats being run.
Assignee: general → brendan
Status: NEW → ASSIGNED
OS: Mac OS X → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.9.1b3
(In reply to comment #0) > Dromaeo's test harness keeps re-numbering the shape of the global object by > overwriting properties of the global object with newly created lambda > functions/constructors (prototype.js:1118). What's this line? I can't find anything relevant at that source line in prototype-1.5.1.1. Is it just one var hash = Class.create(...); that is being rebound each time? On IRC I argued that this does not hurt benchmark test interpreter (property cache) performance, provided the test runs in the iframe and this hash var is set in the parent window. Anything else would interfere too much wiht the test. So tracing should strive to avoid dynamic global scope shape change from invalidating the (iframe) static global scope of the benchmarks. Seems doable, several bugs stand in the way, Andreas kindly offered to file them. We could track them as blockers of this bug. /be
Depends on: 469044
this hits a corner case and regresses perf vs. the interpreter, we should fix if it's not too risky.
Flags: blocking1.9.1+
Keywords: regression
Priority: P1 → P2
Graydon and I discussed the implications of the bug and the fixes needed on top of david's patch. I think its low-impact, and will potentially yield a small perf win in general. It also removes a bunch of out-of-malloc situations: Basic design: - Use a hash table with accepted collisions for frequency counting. Once threshold is met, looking fragments in a 2-level hashmap. - Fragments are allocated into the lirbuf, instead of malloc. Fragments are thus freed on cache flush, and we won't hit separate out of heap conditions.
Depends on: 472180
Priority: P2 → P1
Depends on: 473688
No longer depends on: 473688
Priority: P1 → P2
Forking out the original source of the bug into a new one (shape renumbering), and leaving that with brendan. Stealing the boring parts and distributing to graydon and myself.
Depends on: 473688
Priority: P2 → P1
Summary: TM: v3 of dromaeo causes constant re-numbering of the global object's shape → TM: v3 of dromaeo is slow (due to constant re-numbering of the global object's shape)
Priority: P1 → P2
Depends on: 473689
Assignee: brendan → gal
Depends on: 475474
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: blocking1.9.1+
Keywords: meta
Priority: P2 → --
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.