remove code that dumps threads on long write action waiting, because we have a better one
authorpeter <peter@jetbrains.com>
Thu, 5 Feb 2015 11:54:47 +0000 (12:54 +0100)
committerpeter <peter@jetbrains.com>
Thu, 5 Feb 2015 13:05:13 +0000 (14:05 +0100)
platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationImpl.java

index abd2c8fc6b52a561db809624096807debe3f2596..0d2c973eb4a2098b96ae6a996ae32fdcfdfdcce5 100644 (file)
@@ -17,7 +17,6 @@ package com.intellij.openapi.application.impl;
 
 import com.intellij.BundleBase;
 import com.intellij.CommonBundle;
-import com.intellij.diagnostic.PerformanceWatcher;
 import com.intellij.diagnostic.ThreadDumper;
 import com.intellij.ide.*;
 import com.intellij.ide.plugins.IdeaPluginDescriptor;
@@ -119,8 +118,6 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
   private final Disposable myLastDisposable = Disposer.newDisposable(); // will be disposed last
 
   private final AtomicBoolean mySaveSettingsIsInProgress = new AtomicBoolean(false);
-  @SuppressWarnings({"UseOfArchaicSystemPropertyAccessors"})
-  private static final int ourDumpThreadsOnLongWriteActionWaiting = Integer.getInteger("dump.threads.on.long.write.action.waiting", 0);
 
   private final ExecutorService ourThreadExecutorsService = PooledThreadExecutor.INSTANCE;
   private boolean myIsFiringLoadingEvent = false;
@@ -1179,19 +1176,6 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
         }
         if (!myLock.writeLock().tryLock()) {
           final AtomicBoolean lockAcquired = new AtomicBoolean(false);
-          if (ourDumpThreadsOnLongWriteActionWaiting > 0) {
-            executeOnPooledThread(new Runnable() {
-              @Override
-              public void run() {
-                while (!lockAcquired.get()) {
-                  TimeoutUtil.sleep(ourDumpThreadsOnLongWriteActionWaiting);
-                  if (!lockAcquired.get()) {
-                    PerformanceWatcher.getInstance().dumpThreads(true);
-                  }
-                }
-              }
-            });
-          }
           myLock.writeLock().lockInterruptibly();
           lockAcquired.set(true);
         }