Closed Bug 879874 Opened 11 years ago Closed 11 years ago

GC: purge jitcode when we disable the nursery

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch v0 (obsolete) — Splinter Review
JIT code implicitly bakes the enable/disable status of the nursery into its allocators, so continuing to run existing JIT code after disabling continues to allocate into the disabled nursery. Fortunately, we only disable the nursery when we exceed gcMaxBytes and when we enter post-barrier verification. Because both of these features are only available when testing and fuzzing, the performance of Nursery::disable does not matter at all. Thus, the simple solution of just purging and re-generating the JIT code is adequate in this case.
Attachment #758674 - Flags: review?(bhackett1024)
It seems a little unfortunate to purge jitcode every time we verify post barriers?  How does jitcode bake in the enabled/disabled status?  Since the nursery is resizable jitcode won't bake in the end pointer, and will load it when doing allocations.  If the position >= end when the nursery is disabled then jitcode should always take a slow path when allocating and go through the tenured heap.
Comment on attachment 758674 [details] [diff] [review]
v0

Hmm, okay. I assumed that since you wanted bug 877835 to disable by updating numAvailableChunks_ rather than position_ that you preferred this approach.
Attachment #758674 - Flags: review?(bhackett1024)
If numAvailableChunks_ is zero then the end pointer (which is dynamically loaded by jitcode when allocating from the nursery) should never be > either the start or current position in the nursery.
Attached patch v1Splinter Review
That works well, thanks.
Attachment #758674 - Attachment is obsolete: true
Attachment #758844 - Flags: review?(bhackett1024)
Attachment #758844 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/61a183d6b59e
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: