From 366f7e0751816b31c1983ca85de49bdf90960ac7 Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 14 Feb 2013 17:13:38 -0800 Subject: [PATCH] Bug 832812 - Don't use off-thread Ion compilation while profiling (r=dvander) --HG-- extra : rebase_source : 0bcb79b0d8c1d6d2c0f23efdb0698a27a02f3d45 --- js/src/ion/Ion.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/js/src/ion/Ion.cpp b/js/src/ion/Ion.cpp index b0a07ef61cc..956dbabde09 100644 --- a/js/src/ion/Ion.cpp +++ b/js/src/ion/Ion.cpp @@ -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