Backed out changeset 7c21a5f6881c (bug 1639547) for frequent cppunit failures. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Thu, 21 May 2020 23:45:39 +0300
changeset 531510 e9369a667cd1888711d9c4a5691a38b6c4e3432d
parent 531509 a5c5a7a3cf833a1b08d97cd7ebbbadf75be9a20c
child 531511 313152f639d8331d0dec62368399ea335cd842ce
push id37440
push userabutkovits@mozilla.com
push dateFri, 22 May 2020 09:43:16 +0000
treeherdermozilla-central@fbf71e4d2e21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1639547
milestone78.0a1
backs out7c21a5f6881c6b46b5dde69b6e32b1078331e011
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
Backed out changeset 7c21a5f6881c (bug 1639547) for frequent cppunit failures. CLOSED TREE
js/src/gc/GC.cpp
js/src/vm/HelperThreads.cpp
js/src/vm/HelperThreads.h
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -4200,18 +4200,17 @@ bool GCRuntime::beginMarkPhase(JS::GCRea
   stats().measureInitialHeapSize();
 
   /*
    * Process any queued source compressions during the start of a major
    * GC.
    */
   {
     AutoLockHelperThreadState helperLock;
-    HelperThreadState().startHandlingCompressionTasks(
-        helperLock, GlobalHelperThreadState::ScheduleCompressionTask::GC);
+    HelperThreadState().startHandlingCompressionTasks(helperLock);
   }
 
   return true;
 }
 
 void GCRuntime::findDeadCompartments() {
   gcstats::AutoPhase ap1(stats(), gcstats::PhaseKind::MARK_ROOTS);
   gcstats::AutoPhase ap2(stats(), gcstats::PhaseKind::MARK_COMPARTMENTS);
--- a/js/src/vm/HelperThreads.cpp
+++ b/js/src/vm/HelperThreads.cpp
@@ -1670,30 +1670,30 @@ bool GlobalHelperThreadState::canStartPa
 
 bool GlobalHelperThreadState::canStartCompressionTask(
     const AutoLockHelperThreadState& lock) {
   return !compressionWorklist(lock).empty() &&
          checkTaskThreadLimit<SourceCompressionTask*>(maxCompressionThreads());
 }
 
 void GlobalHelperThreadState::startHandlingCompressionTasks(
-    const AutoLockHelperThreadState& lock, ScheduleCompressionTask schedule) {
-  scheduleCompressionTasks(lock, schedule);
+    const AutoLockHelperThreadState& lock) {
+  scheduleCompressionTasks(lock);
   if (canStartCompressionTask(lock)) {
     notifyOne(PRODUCER, lock);
   }
 }
 
 void GlobalHelperThreadState::scheduleCompressionTasks(
-    const AutoLockHelperThreadState& lock, ScheduleCompressionTask schedule) {
+    const AutoLockHelperThreadState& lock) {
   auto& pending = compressionPendingList(lock);
   auto& worklist = compressionWorklist(lock);
 
   for (size_t i = 0; i < pending.length(); i++) {
-    if (pending[i]->shouldStart() || schedule != ScheduleCompressionTask::GC) {
+    if (pending[i]->shouldStart()) {
       // OOMing during appending results in the task not being scheduled
       // and deleted.
       Unused << worklist.append(std::move(pending[i]));
       remove(pending, &i);
     }
   }
 }
 
@@ -2364,18 +2364,17 @@ void js::AttachFinishedCompressions(JSRu
 
 void js::RunPendingSourceCompressions(JSRuntime* runtime) {
   AutoLockHelperThreadState lock;
 
   if (!HelperThreadState().threads) {
     return;
   }
 
-  HelperThreadState().startHandlingCompressionTasks(
-      lock, GlobalHelperThreadState::ScheduleCompressionTask::API);
+  HelperThreadState().startHandlingCompressionTasks(lock);
 
   // Wait for all in-process compression tasks to complete.
   while (!HelperThreadState().compressionWorklist(lock).empty()) {
     HelperThreadState().wait(lock, GlobalHelperThreadState::CONSUMER);
   }
 
   AttachFinishedCompressions(runtime, lock);
 }
--- a/js/src/vm/HelperThreads.h
+++ b/js/src/vm/HelperThreads.h
@@ -289,28 +289,24 @@ class GlobalHelperThreadState {
   bool canStartWasmTier2Generator(const AutoLockHelperThreadState& lock);
   bool canStartPromiseHelperTask(const AutoLockHelperThreadState& lock);
   bool canStartIonCompile(const AutoLockHelperThreadState& lock);
   bool canStartIonFreeTask(const AutoLockHelperThreadState& lock);
   bool canStartParseTask(const AutoLockHelperThreadState& lock);
   bool canStartCompressionTask(const AutoLockHelperThreadState& lock);
   bool canStartGCParallelTask(const AutoLockHelperThreadState& lock);
 
-  enum class ScheduleCompressionTask { GC, API };
-
   // Used by a major GC to signal processing enqueued compression tasks.
-  void startHandlingCompressionTasks(const AutoLockHelperThreadState&,
-                                     ScheduleCompressionTask schedule);
+  void startHandlingCompressionTasks(const AutoLockHelperThreadState&);
 
   jit::IonCompileTask* highestPriorityPendingIonCompile(
       const AutoLockHelperThreadState& lock);
 
  private:
-  void scheduleCompressionTasks(const AutoLockHelperThreadState&,
-                                ScheduleCompressionTask schedule);
+  void scheduleCompressionTasks(const AutoLockHelperThreadState&);
 
   UniquePtr<ParseTask> finishParseTaskCommon(JSContext* cx, ParseTaskKind kind,
                                              JS::OffThreadToken* token);
 
   JSScript* finishSingleParseTask(JSContext* cx, ParseTaskKind kind,
                                   JS::OffThreadToken* token);
   bool finishMultiParseTask(JSContext* cx, ParseTaskKind kind,
                             JS::OffThreadToken* token,