Closed Bug 1697984 Opened 3 years ago Closed 3 years ago

Reserve stack capacity for CompilationGCOutput vectors

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

For the same reasons as Bug 1689161, we should use inline vector capacity for CompilationGCOutput. Inlining 1 function and 1 scope should cover about 80% of delazifications.

In a simple delazification, we hit jemalloc 7 times:

  1. LifoAlloc first chunk due to NewEmptyParserScopeData
  2. ImmutableScriptData new
  3. SharedImmutableScriptData new
  4. CompilationGCOutput reserve functions == 1
  5. CompilationGCOutput reserve scopes == 1
  6. LiftParserScopeData
  7. PrivateScriptData new

We should be able to remove number 4/5 with this simple change. Steps 2,3,6,7 form the JSScript representation and are not currently the parser's fault.

Similar to what we do for CompilationStencil we should reserve a modest
amount of inline capacity to cover the bulk of delazifications.

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b89925f96759
Reserve inline space in CompilationGCOutput vectors. r=arai
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: