Bug 1638764 - Wait for background allocation before copying chunk mark bits r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 22 May 2020 16:12:43 +0000
changeset 531680 d583fafc8eda4f724723d0e0ef30e07e96706740
parent 531679 ca3a6d8183a8c1725b16d2728b405b7adebf0ff1
child 531681 a5fc1b604238d69b24fe48ab8a2adb28fb9c5796
push id37442
push userncsoregi@mozilla.com
push dateSat, 23 May 2020 09:21:24 +0000
treeherdermozilla-central@bbcc193fe0f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1638764
milestone78.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
Bug 1638764 - Wait for background allocation before copying chunk mark bits r=sfink I think the problem is that background allocation is creating a new chunk after we copy the mark bits for the existing chunks, so we fail to find the new chunk in the map. If so then we need to wait for that first, and after we know any off-thread parsing has finished. Differential Revision: https://phabricator.services.mozilla.com/D76453
js/src/gc/Verifier.cpp
--- a/js/src/gc/Verifier.cpp
+++ b/js/src/gc/Verifier.cpp
@@ -495,21 +495,22 @@ void js::gc::MarkingValidator::nonIncrem
    */
 
   JSRuntime* runtime = gc->rt;
   GCMarker* gcmarker = &gc->marker;
 
   MOZ_ASSERT(gc->nursery().isEmpty());
   MOZ_ASSERT(!gcmarker->isWeakMarking());
 
-  gc->waitBackgroundSweepEnd();
-
   /* Wait for off-thread parsing which can allocate. */
   HelperThreadState().waitForAllThreads();
 
+  gc->waitBackgroundAllocEnd();
+  gc->waitBackgroundSweepEnd();
+
   /* Save existing mark bits. */
   {
     AutoLockGC lock(gc);
     for (auto chunk = gc->allNonEmptyChunks(lock); !chunk.done();
          chunk.next()) {
       ChunkBitmap* bitmap = &chunk->bitmap;
       auto entry = MakeUnique<ChunkBitmap>();
       if (!entry) {