author | Shu-yu Guo <shu@rfrn.org> |
Thu, 18 Aug 2016 15:24:48 -0700 | |
changeset 310197 | 121757de3a7dd0292b64d4956840c0cd0a3e90c7 |
parent 310196 | cf746c67d0e9ecb8fd06b30ef9247585070ae5b0 |
child 310198 | 8d71aba5c1e7b96308a6e87ba0c66edafbd1dbdc |
push id | 30576 |
push user | ryanvm@gmail.com |
push date | Fri, 19 Aug 2016 13:53:39 +0000 |
treeherder | mozilla-central@74f332c38a69 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | djvj |
bugs | 1295775 |
milestone | 51.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/jsgc.cpp | file | annotate | diff | comparison | revisions |
--- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -221,16 +221,17 @@ #include "jit/BaselineJIT.h" #include "jit/IonCode.h" #include "jit/JitcodeMap.h" #include "js/SliceBudget.h" #include "proxy/DeadObjectProxy.h" #include "vm/Debugger.h" #include "vm/ProxyObject.h" #include "vm/Shape.h" +#include "vm/SPSProfiler.h" #include "vm/String.h" #include "vm/Symbol.h" #include "vm/Time.h" #include "vm/TraceLogging.h" #include "vm/WrapperObject.h" #include "jsobjinlines.h" #include "jsscriptinlines.h" @@ -5471,16 +5472,22 @@ GCRuntime::compactPhase(JS::gcreason::Re AutoLockForExclusiveAccess& lock) { MOZ_ASSERT(rt->gc.nursery.isEmpty()); assertBackgroundSweepingFinished(); MOZ_ASSERT(startedCompacting); gcstats::AutoPhase ap(stats, gcstats::PHASE_COMPACT); + // TODO: JSScripts can move. If the sampler interrupts the GC in the + // middle of relocating an arena, invalid JSScript pointers may be + // accessed. Suppress all sampling until a finer-grained solution can be + // found. See bug 1295775. + AutoSuppressProfilerSampling suppressSampling(rt); + while (!zonesToMaybeCompact.isEmpty()) { Zone* zone = zonesToMaybeCompact.front(); MOZ_ASSERT(zone->isGCFinished()); Arena* relocatedArenas = nullptr; if (relocateArenas(zone, reason, relocatedArenas, sliceBudget)) { zone->setGCState(Zone::Compact); updatePointersToRelocatedCells(zone, lock); zone->setGCState(Zone::Finished);