Specify heap (nursery/tenured) when allocating strings
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: sfink, Assigned: sfink)
References
Details
Attachments
(4 files, 1 obsolete file)
For a test in bug 1568923, I wanted to be able to allocate a tenured string, even when nursery strings are enabled. This required plumbing a heap parameter through lots of places. I took the opportunity to examine each allocation site and decide whether it might make more sense to pretenure.
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
Comment 6•4 years ago
|
||
This is a bigger change than I realised. But I guess we will need this if we want to pretenure strings by site anyway right?
Assignee | ||
Comment 7•4 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #6)
This is a bigger change than I realised. But I guess we will need this if we want to pretenure strings by site anyway right?
Yeah, this is why I did the weird delayed pretenuring thing initially.
I'm not entirely sure how much of this we would need for site-specific pretenuring. There might only be a few relevant C++ allocation sites, but I don't know. I think this is still worth doing because it revealed a number of places where we should already be pretenuring, and in fact I purely slowed things down when allocating into the nursery (for atoms). Also, it didn't seem like there was any clean way to only do a subset of the callsites.
I didn't expose heap control to the external API. I haven't even looked to see whether that would be useful.
The one place I'm unsure of is where I pass in a constant gc::DefaultHeap
value to the JIT. I could create a separate C++ function for doing that and avoid a small amount of JIT code bloat.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9bffd2444c17
https://hg.mozilla.org/mozilla-central/rev/ccb2b543e09c
Description
•