Bug 1509322 - Relax some ChunkPool assertions which could make debug build GCs very slow r=pbone
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 23 Nov 2018 11:11:22 +0000
changeset 507093 2094cc4738e87fd6ed68fe52ae5675aadc822876
parent 507008 c2593a3058afdfeaac5c990e18794ee8257afe99
child 507094 ec957266789d54f03eb5f5fe4fdf7dda556afb59
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbone
bugs1509322
milestone65.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 1509322 - Relax some ChunkPool assertions which could make debug build GCs very slow r=pbone
js/src/gc/GC.cpp
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -737,18 +737,16 @@ ChunkPool::push(Chunk* chunk)
     MOZ_ASSERT(!chunk->info.prev);
 
     chunk->info.next = head_;
     if (head_) {
         head_->info.prev = chunk;
     }
     head_ = chunk;
     ++count_;
-
-    MOZ_ASSERT(verify());
 }
 
 Chunk*
 ChunkPool::remove(Chunk* chunk)
 {
     MOZ_ASSERT(count_ > 0);
     MOZ_ASSERT(contains(chunk));
 
@@ -759,17 +757,16 @@ ChunkPool::remove(Chunk* chunk)
         chunk->info.prev->info.next = chunk->info.next;
     }
     if (chunk->info.next) {
         chunk->info.next->info.prev = chunk->info.prev;
     }
     chunk->info.next = chunk->info.prev = nullptr;
     --count_;
 
-    MOZ_ASSERT(verify());
     return chunk;
 }
 
 #ifdef DEBUG
 bool
 ChunkPool::contains(Chunk* chunk) const
 {
     verify();
@@ -947,19 +944,17 @@ Chunk::updateChunkListAfterAlloc(JSRunti
 
 void
 Chunk::updateChunkListAfterFree(JSRuntime* rt, const AutoLockGC& lock)
 {
     if (info.numArenasFree == 1) {
         rt->gc.fullChunks(lock).remove(this);
         rt->gc.availableChunks(lock).push(this);
     } else if (!unused()) {
-        MOZ_ASSERT(!rt->gc.fullChunks(lock).contains(this));
         MOZ_ASSERT(rt->gc.availableChunks(lock).contains(this));
-        MOZ_ASSERT(!rt->gc.emptyChunks(lock).contains(this));
     } else {
         MOZ_ASSERT(unused());
         rt->gc.availableChunks(lock).remove(this);
         decommitAllArenas();
         MOZ_ASSERT(info.numArenasFreeCommitted == 0);
         rt->gc.recycleChunk(this, lock);
     }
 }