GC: Cut out unnecessary work when not collecting atoms

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
--
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jonco, Assigned: jonco)

Tracking

Trunk
mozilla17
All
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 651429 [details]
Proposed fix

At the moment, if atoms are not being collected then every atom is marked in the mark phase so that no atoms will be collected in sweep phase.  It's more efficient to neither mark nor sweep the atoms in this case.

Also, we can simplify things by setting the collecting flag of the atoms compartment to record whether atoms are being swept at the start of collection.
(Assignee)

Updated

5 years ago
Severity: normal → minor
Hardware: x86 → All
(Assignee)

Comment 1

5 years ago
Created attachment 651432 [details] [diff] [review]
Proposed fix
Attachment #651429 - Attachment is obsolete: true
Attachment #651432 - Flags: review?(wmccloskey)
Attachment #651432 - Attachment is patch: true
(Assignee)

Updated

5 years ago
Assignee: general → jcoppeard
Comment on attachment 651432 [details] [diff] [review]
Proposed fix

Review of attachment 651432 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsgc.cpp
@@ +3507,1 @@
>      {

Brace should be on the same line as the if.
Attachment #651432 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/13d2ad44ba74
https://hg.mozilla.org/mozilla-central/rev/13d2ad44ba74
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.