Bug 903519 - Allocate strings in the nursery, r=flagflip

--HG--
extra : rebase_source : d35edd2f62c0736f302972e603b7c8b12365bc9f
extra : source : c9f0ec7b3f114d122cf4226a1bd8c1b32d81b803
This commit is contained in:
Steve Fink 2018-02-21 11:36:52 -08:00
parent 53412618be
commit 5aa9b78a4d
2 changed files with 6 additions and 6 deletions

View File

@ -123,7 +123,7 @@ js::Nursery::Nursery(JSRuntime* rt)
, previousPromotionRate_(0)
, profileThreshold_(0)
, enableProfiling_(false)
, canAllocateStrings_(false)
, canAllocateStrings_(true)
, reportTenurings_(0)
, minorGCTriggerReason_(JS::gcreason::NO_REASON)
, minorGcCount_(0)
@ -132,9 +132,9 @@ js::Nursery::Nursery(JSRuntime* rt)
, lastCanary_(nullptr)
#endif
{
const char* env = getenv("MOZ_ENABLE_NURSERY_STRINGS");
const char* env = getenv("MOZ_DISABLE_NURSERY_STRINGS");
if (env && *env)
canAllocateStrings_ = true;
canAllocateStrings_ = false;
}
bool

View File

@ -9083,7 +9083,7 @@ main(int argc, char** argv, char** envp)
|| !op.addBoolOption('\0', "no-ggc", "Disable Generational GC")
|| !op.addBoolOption('\0', "no-cgc", "Disable Compacting GC")
|| !op.addBoolOption('\0', "no-incremental-gc", "Disable Incremental GC")
|| !op.addBoolOption('\0', "nursery-strings", "Allocate strings in the nursery")
|| !op.addBoolOption('\0', "no-nursery-strings", "Do not allocate strings in the nursery")
|| !op.addIntOption('\0', "available-memory", "SIZE",
"Select GC settings based on available memory (MB)", 0)
|| !op.addStringOption('\0', "arm-hwcap", "[features]",
@ -9231,8 +9231,8 @@ main(int argc, char** argv, char** envp)
js::UseInternalJobQueues(cx);
if (op.getBoolOption("nursery-strings"))
cx->runtime()->gc.nursery().enableStrings();
if (op.getBoolOption("no-nursery-strings"))
cx->runtime()->gc.nursery().disableStrings();
if (!JS::InitSelfHostedCode(cx))
return 1;