Closed Bug 1001359 Opened 6 years ago Closed 6 years ago

Add chunk type word to chunk trailer

Categories

(Core :: JavaScript: GC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

We should add a word to the chunk trailer to indicate chunk type: tenured heap or nursery.

This was originally proposed for performance reasons in bug 988950 but dropped because it didn't provide a win on ARM.

Now it looks like it would be useful for PJS.
See https://bugzilla.mozilla.org/show_bug.cgi?id=933313#c29 for some details on the PJS use case.

A single bit would help, though a smallish value allowing the encoding of different cases /might/ be even more useful.  For example, the PJS nurseries all have a newspace (for allocation) and, during GC, a fromspace (the old newspace); in some cases it's useful / necessary to distinguish these.  That said, I'm not sure that those use cases aren't better served by other mechanisms, so a single bit would be a good start.
Attached patch chunk-locationSplinter Review
Here's the patch to add this.  It's not currently used anywhere so I added a test to exercise it.
Attachment #8412598 - Flags: review?(terrence)
Comment on attachment 8412598 [details] [diff] [review]
chunk-location

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

Great! r=me
Attachment #8412598 - Flags: review?(terrence) → review+
Backed out for wrong bug number in commit message and relanded:

https://hg.mozilla.org/integration/mozilla-inbound/rev/dc3c5febcdaf
https://hg.mozilla.org/mozilla-central/rev/dc3c5febcdaf
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.