Bug 832812 - Don't use off-thread Ion compilation while profiling (r=dvander)

--HG--
extra : rebase_source : 0bcb79b0d8c1d6d2c0f23efdb0698a27a02f3d45
This commit is contained in:
Bill McCloskey 2013-02-14 17:13:38 -08:00
parent 3e97357b69
commit 366f7e0751

View File

@ -1201,13 +1201,19 @@ OffThreadCompilationAvailable(JSContext *cx)
{
// Even if off thread compilation is enabled, compilation must still occur
// on the main thread in some cases. Do not compile off thread during an
// incremental GC, as this may trip incremental read barriers. Also skip
// off thread compilation if script execution is being profiled, as
// incremental GC, as this may trip incremental read barriers.
//
// Skip off thread compilation if PC count profiling is enabled, as
// CodeGenerator::maybeCreateScriptCounts will not attach script profiles
// when running off thread.
//
// Also skip off thread compilation if the SPS profiler is enabled, as it
// stores strings in the spsProfiler data structure, which is not protected
// by a lock.
return OffThreadCompilationEnabled(cx)
&& cx->runtime->gcIncrementalState == gc::NO_INCREMENTAL
&& !cx->runtime->profilingScripts;
&& !cx->runtime->profilingScripts
&& !cx->runtime->spsProfiler.enabled();
}
AbortReason