author | Steve Fink <sfink@mozilla.com> |
Mon, 13 Mar 2017 10:43:09 -0700 | |
changeset 347478 | 42720d7bd306f4a700a28ed2c78ad32381777570 |
parent 347477 | 950180909fd0e5031a04fcd4cb8f94ff4be72ae6 |
child 347479 | 22874b29ac930217a734d5adcb61d34011328124 |
push id | 31497 |
push user | cbook@mozilla.com |
push date | Tue, 14 Mar 2017 13:23:16 +0000 |
treeherder | mozilla-central@08f709c14bf7 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mccr8 |
bugs | 1346874 |
milestone | 55.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 @@ -7933,21 +7933,29 @@ js::gc::detail::CellIsNotGray(const Cell if (!CanCheckGrayBits(cell)) return true; auto tc = &cell->asTenured(); if (!detail::CellIsMarkedGray(tc)) return true; + // The cell is gray, but may eventually be marked black if we are in an + // incremental GC and the cell is reachable by something on the mark stack. + auto rt = tc->runtimeFromAnyThread(); - Zone* sourceZone = nullptr; - if (rt->gc.isIncrementalGCInProgress() && - !tc->zone()->wasGCStarted() && - (sourceZone = rt->gc.marker.stackContainsCrossZonePointerTo(tc)) && - sourceZone->wasGCStarted()) - { + if (!rt->gc.isIncrementalGCInProgress() || tc->zone()->wasGCStarted()) + return false; + + // Bug 1346874 - The stack check is expensive. Android tests are already + // slow enough that this check can easily push them over the threshold to a + // timeout. So always assume the best on Android. +# ifdef ANDROID + return true; +# else + Zone* sourceZone = rt->gc.marker.stackContainsCrossZonePointerTo(tc); + if (sourceZone && sourceZone->wasGCStarted()) return true; - } return false; +# endif } #endif