mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-168766 Debugged process hangs during hot-swapping with yourkit agent - workaround, disabled by default
This commit is contained in:
@@ -27,6 +27,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.util.StringBuilderSpinAllocator;
|
||||
import com.intellij.util.concurrency.Semaphore;
|
||||
import com.intellij.util.ui.MessageCategory;
|
||||
@@ -42,6 +43,7 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
/**
|
||||
* @author lex
|
||||
@@ -113,6 +115,12 @@ class ReloadClassesWorker {
|
||||
|
||||
//virtualMachineProxy.suspend();
|
||||
|
||||
if (Registry.is("debugger.resume.yourkit.threads")) {
|
||||
virtualMachineProxy.allThreads().stream()
|
||||
.filter(t -> t.isSuspended() && t.name().startsWith("YJPAgent-"))
|
||||
.forEach(t -> IntStream.range(0, t.getSuspendCount()).forEach(i -> t.resume()));
|
||||
}
|
||||
|
||||
try {
|
||||
RedefineProcessor redefineProcessor = new RedefineProcessor(virtualMachineProxy);
|
||||
|
||||
|
||||
@@ -261,6 +261,7 @@ debugger.intern.string.literals=false
|
||||
debugger.intern.string.literals.description=Make string literal refer to the same instance of class String
|
||||
debugger.capture.points=true
|
||||
debugger.capture.points.annotations=false
|
||||
debugger.resume.yourkit.threads=false
|
||||
|
||||
analyze.exceptions.on.the.fly=false
|
||||
analyze.exceptions.on.the.fly.description=Automatically analyze clipboard on frame activation,\
|
||||
|
||||
Reference in New Issue
Block a user