mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-12 22:11:27 +07:00
IDEA-359455 Disable JIT option adds incompatible VM option -Xnoagent - dropped the setting
GitOrigin-RevId: 5bf5889d8d5b8790ac6959aca384f668bd6d89ac
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d2bfc2652e
commit
2ba8f51a30
@@ -1,5 +0,0 @@
|
|||||||
#---------------------------------------------------------------------
|
|
||||||
# The VM option value to be used to start a JVM in debug mode.
|
|
||||||
# Some JREs define it in a different way (-XXdebug in Oracle VM)
|
|
||||||
#---------------------------------------------------------------------
|
|
||||||
idea.xdebug.key=-Xdebug
|
|
||||||
@@ -43,7 +43,6 @@ open class IdeaCommunityProperties(private val communityHomeDir: Path) : BaseIde
|
|||||||
init {
|
init {
|
||||||
platformPrefix = "Idea"
|
platformPrefix = "Idea"
|
||||||
applicationInfoModule = "intellij.idea.community.customization"
|
applicationInfoModule = "intellij.idea.community.customization"
|
||||||
additionalIDEPropertiesFilePaths = persistentListOf(communityHomeDir.resolve("build/conf/ideaCE.properties"))
|
|
||||||
scrambleMainJar = false
|
scrambleMainJar = false
|
||||||
useSplash = true
|
useSplash = true
|
||||||
buildCrossPlatformDistribution = true
|
buildCrossPlatformDistribution = true
|
||||||
|
|||||||
@@ -130,32 +130,12 @@ public class RemoteConnectionBuilder {
|
|||||||
addDebuggerAgent(parameters, myProject, true);
|
addDebuggerAgent(parameters, myProject, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean forceNoJIT = DebuggerSettings.getInstance().DISABLE_JIT;
|
parameters.getVMParametersList().replaceOrPrepend("-Xrunjdwp:", "");
|
||||||
final String debugKey = System.getProperty(DEBUG_KEY_NAME, "-Xdebug");
|
parameters.getVMParametersList().replaceOrPrepend("-agentlib:jdwp=", "-agentlib:jdwp=" + _debuggeeRunProperties);
|
||||||
final boolean needDebugKey = forceNoJIT || !"-Xdebug".equals(debugKey) /*the key is non-standard*/;
|
|
||||||
|
|
||||||
if (forceNoJIT || needDebugKey) {
|
// deliberately skip outdated parameter because it can disable full-speed debugging for some jdk builds
|
||||||
parameters.getVMParametersList().replaceOrPrepend("-Xrunjdwp:", "-Xrunjdwp:" + _debuggeeRunProperties);
|
// see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6272174
|
||||||
}
|
parameters.getVMParametersList().replaceOrPrepend("-Xdebug", "");
|
||||||
else {
|
|
||||||
// use newer JVMTI if available
|
|
||||||
parameters.getVMParametersList().replaceOrPrepend("-Xrunjdwp:", "");
|
|
||||||
parameters.getVMParametersList().replaceOrPrepend("-agentlib:jdwp=", "-agentlib:jdwp=" + _debuggeeRunProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (forceNoJIT) {
|
|
||||||
parameters.getVMParametersList().replaceOrPrepend("-Djava.compiler=", "-Djava.compiler=NONE");
|
|
||||||
parameters.getVMParametersList().replaceOrPrepend("-Xnoagent", "-Xnoagent");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (needDebugKey) {
|
|
||||||
parameters.getVMParametersList().replaceOrPrepend(debugKey, debugKey);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// deliberately skip outdated parameter because it can disable full-speed debugging for some jdk builds
|
|
||||||
// see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6272174
|
|
||||||
parameters.getVMParametersList().replaceOrPrepend("-Xdebug", "");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return new RemoteConnection(useSockets, DebuggerManagerImpl.LOCALHOST_ADDRESS_FALLBACK, address, myServer);
|
return new RemoteConnection(useSockets, DebuggerManagerImpl.LOCALHOST_ADDRESS_FALLBACK, address, myServer);
|
||||||
@@ -179,7 +159,6 @@ public class RemoteConnectionBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final String AGENT_JAR_NAME = "debugger-agent.jar";
|
private static final String AGENT_JAR_NAME = "debugger-agent.jar";
|
||||||
private static final String DEBUG_KEY_NAME = "idea.xdebug.key";
|
|
||||||
|
|
||||||
public static void addDebuggerAgent(JavaParameters parameters, @Nullable Project project, boolean checkJdkVersion) {
|
public static void addDebuggerAgent(JavaParameters parameters, @Nullable Project project, boolean checkJdkVersion) {
|
||||||
if (AsyncStacksUtils.isAgentEnabled()) {
|
if (AsyncStacksUtils.isAgentEnabled()) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.debugger.settings;
|
package com.intellij.debugger.settings;
|
||||||
|
|
||||||
import com.intellij.debugger.JavaDebuggerBundle;
|
import com.intellij.debugger.JavaDebuggerBundle;
|
||||||
@@ -17,7 +17,6 @@ import java.awt.*;
|
|||||||
class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings> {
|
class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings> {
|
||||||
private JRadioButton myRbSocket;
|
private JRadioButton myRbSocket;
|
||||||
private JRadioButton myRbShmem;
|
private JRadioButton myRbShmem;
|
||||||
private JCheckBox myCbDisableJIT;
|
|
||||||
private JCheckBox myCbShowAlternativeSource;
|
private JCheckBox myCbShowAlternativeSource;
|
||||||
private JCheckBox myCbKillImmediately;
|
private JCheckBox myCbKillImmediately;
|
||||||
private JCheckBox myCbAlwaysDebug;
|
private JCheckBox myCbAlwaysDebug;
|
||||||
@@ -38,7 +37,6 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
|||||||
}
|
}
|
||||||
myRbShmem.setEnabled(true);
|
myRbShmem.setEnabled(true);
|
||||||
}
|
}
|
||||||
myCbDisableJIT.setSelected(settings.DISABLE_JIT);
|
|
||||||
myCbShowAlternativeSource.setSelected(settings.SHOW_ALTERNATIVE_SOURCE);
|
myCbShowAlternativeSource.setSelected(settings.SHOW_ALTERNATIVE_SOURCE);
|
||||||
myCbKillImmediately.setSelected(settings.KILL_PROCESS_IMMEDIATELY);
|
myCbKillImmediately.setSelected(settings.KILL_PROCESS_IMMEDIATELY);
|
||||||
myCbAlwaysDebug.setSelected(settings.ALWAYS_DEBUG);
|
myCbAlwaysDebug.setSelected(settings.ALWAYS_DEBUG);
|
||||||
@@ -52,7 +50,6 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
|||||||
|
|
||||||
private void getSettingsTo(DebuggerSettings settings) {
|
private void getSettingsTo(DebuggerSettings settings) {
|
||||||
settings.setTransport(myRbShmem.isSelected() ? DebuggerSettings.SHMEM_TRANSPORT : DebuggerSettings.SOCKET_TRANSPORT);
|
settings.setTransport(myRbShmem.isSelected() ? DebuggerSettings.SHMEM_TRANSPORT : DebuggerSettings.SOCKET_TRANSPORT);
|
||||||
settings.DISABLE_JIT = myCbDisableJIT.isSelected();
|
|
||||||
settings.SHOW_ALTERNATIVE_SOURCE = myCbShowAlternativeSource.isSelected();
|
settings.SHOW_ALTERNATIVE_SOURCE = myCbShowAlternativeSource.isSelected();
|
||||||
settings.KILL_PROCESS_IMMEDIATELY = myCbKillImmediately.isSelected();
|
settings.KILL_PROCESS_IMMEDIATELY = myCbKillImmediately.isSelected();
|
||||||
settings.ALWAYS_DEBUG = myCbAlwaysDebug.isSelected();
|
settings.ALWAYS_DEBUG = myCbAlwaysDebug.isSelected();
|
||||||
@@ -69,7 +66,6 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public JComponent getComponent() {
|
public JComponent getComponent() {
|
||||||
myCbDisableJIT = new JCheckBox(JavaDebuggerBundle.message("label.debugger.launching.configurable.disable.jit"));
|
|
||||||
myCbShowAlternativeSource = new JCheckBox(JavaDebuggerBundle.message("label.debugger.general.configurable.show.alternative.source"));
|
myCbShowAlternativeSource = new JCheckBox(JavaDebuggerBundle.message("label.debugger.general.configurable.show.alternative.source"));
|
||||||
myRbSocket = new JRadioButton(JavaDebuggerBundle.message("label.debugger.launching.configurable.socket"));
|
myRbSocket = new JRadioButton(JavaDebuggerBundle.message("label.debugger.launching.configurable.socket"));
|
||||||
myRbShmem = new JRadioButton(JavaDebuggerBundle.message("label.debugger.launching.configurable.shmem"));
|
myRbShmem = new JRadioButton(JavaDebuggerBundle.message("label.debugger.launching.configurable.shmem"));
|
||||||
@@ -93,7 +89,6 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
|||||||
VerticalBox panel = new VerticalBox();
|
VerticalBox panel = new VerticalBox();
|
||||||
panel.setOpaque(false);
|
panel.setOpaque(false);
|
||||||
panel.add(transportPanel);
|
panel.add(transportPanel);
|
||||||
panel.add(myCbDisableJIT);
|
|
||||||
panel.add(myCbShowAlternativeSource);
|
panel.add(myCbShowAlternativeSource);
|
||||||
panel.add(myCbKillImmediately);
|
panel.add(myCbKillImmediately);
|
||||||
if (MemoryAgentUtil.isPlatformSupported()) {
|
if (MemoryAgentUtil.isPlatformSupported()) {
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ public final class DebuggerSettings implements Cloneable, PersistentStateCompone
|
|||||||
@OptionTag("DEBUGGER_TRANSPORT")
|
@OptionTag("DEBUGGER_TRANSPORT")
|
||||||
private int DEBUGGER_TRANSPORT;
|
private int DEBUGGER_TRANSPORT;
|
||||||
|
|
||||||
public boolean DISABLE_JIT;
|
|
||||||
public boolean SHOW_ALTERNATIVE_SOURCE = true;
|
public boolean SHOW_ALTERNATIVE_SOURCE = true;
|
||||||
public volatile boolean ENABLE_MEMORY_AGENT =
|
public volatile boolean ENABLE_MEMORY_AGENT =
|
||||||
ApplicationManager.getApplication().isEAP() && !ApplicationManager.getApplication().isUnitTestMode();
|
ApplicationManager.getApplication().isEAP() && !ApplicationManager.getApplication().isUnitTestMode();
|
||||||
@@ -170,7 +169,6 @@ public final class DebuggerSettings implements Cloneable, PersistentStateCompone
|
|||||||
TRACING_FILTERS_ENABLED == secondSettings.TRACING_FILTERS_ENABLED &&
|
TRACING_FILTERS_ENABLED == secondSettings.TRACING_FILTERS_ENABLED &&
|
||||||
DEBUGGER_TRANSPORT == secondSettings.DEBUGGER_TRANSPORT &&
|
DEBUGGER_TRANSPORT == secondSettings.DEBUGGER_TRANSPORT &&
|
||||||
StringUtil.equals(EVALUATE_FINALLY_ON_POP_FRAME, secondSettings.EVALUATE_FINALLY_ON_POP_FRAME) &&
|
StringUtil.equals(EVALUATE_FINALLY_ON_POP_FRAME, secondSettings.EVALUATE_FINALLY_ON_POP_FRAME) &&
|
||||||
DISABLE_JIT == secondSettings.DISABLE_JIT &&
|
|
||||||
SHOW_ALTERNATIVE_SOURCE == secondSettings.SHOW_ALTERNATIVE_SOURCE &&
|
SHOW_ALTERNATIVE_SOURCE == secondSettings.SHOW_ALTERNATIVE_SOURCE &&
|
||||||
KILL_PROCESS_IMMEDIATELY == secondSettings.KILL_PROCESS_IMMEDIATELY &&
|
KILL_PROCESS_IMMEDIATELY == secondSettings.KILL_PROCESS_IMMEDIATELY &&
|
||||||
ALWAYS_DEBUG == secondSettings.ALWAYS_DEBUG &&
|
ALWAYS_DEBUG == secondSettings.ALWAYS_DEBUG &&
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.debugger.settings;
|
package com.intellij.debugger.settings;
|
||||||
|
|
||||||
import com.intellij.internal.statistic.beans.MetricEvent;
|
import com.intellij.internal.statistic.beans.MetricEvent;
|
||||||
@@ -14,9 +14,8 @@ import java.util.Set;
|
|||||||
import static com.intellij.internal.statistic.beans.MetricEventUtilKt.addBoolIfDiffers;
|
import static com.intellij.internal.statistic.beans.MetricEventUtilKt.addBoolIfDiffers;
|
||||||
|
|
||||||
public final class DebuggerSettingsStatisticsCollector extends ApplicationUsagesCollector {
|
public final class DebuggerSettingsStatisticsCollector extends ApplicationUsagesCollector {
|
||||||
private static final EventLogGroup GROUP = new EventLogGroup("debugger.settings.ide", 5);
|
private static final EventLogGroup GROUP = new EventLogGroup("debugger.settings.ide", 6);
|
||||||
|
|
||||||
private static final VarargEventId DISABLE_JIT = GROUP.registerVarargEvent("disableJit", EventFields.Enabled);
|
|
||||||
private static final VarargEventId SHOW_ALTERNATIVE_SOURCE = GROUP.registerVarargEvent("showAlternativeSource", EventFields.Enabled);
|
private static final VarargEventId SHOW_ALTERNATIVE_SOURCE = GROUP.registerVarargEvent("showAlternativeSource", EventFields.Enabled);
|
||||||
private static final VarargEventId HOTSWAP_IN_BACKROUND = GROUP.registerVarargEvent("hotswapInBackround", EventFields.Enabled);
|
private static final VarargEventId HOTSWAP_IN_BACKROUND = GROUP.registerVarargEvent("hotswapInBackround", EventFields.Enabled);
|
||||||
private static final VarargEventId ENABLE_MEMORY_AGENT = GROUP.registerVarargEvent("enableMemoryAgent", EventFields.Enabled);
|
private static final VarargEventId ENABLE_MEMORY_AGENT = GROUP.registerVarargEvent("enableMemoryAgent", EventFields.Enabled);
|
||||||
@@ -46,7 +45,6 @@ public final class DebuggerSettingsStatisticsCollector extends ApplicationUsages
|
|||||||
DebuggerSettings settings = DebuggerSettings.getInstance();
|
DebuggerSettings settings = DebuggerSettings.getInstance();
|
||||||
DebuggerSettings sDefault = new DebuggerSettings();
|
DebuggerSettings sDefault = new DebuggerSettings();
|
||||||
|
|
||||||
addBoolIfDiffers(set, settings, sDefault, s -> s.DISABLE_JIT, DISABLE_JIT);
|
|
||||||
addBoolIfDiffers(set, settings, sDefault, s -> s.SHOW_ALTERNATIVE_SOURCE, SHOW_ALTERNATIVE_SOURCE);
|
addBoolIfDiffers(set, settings, sDefault, s -> s.SHOW_ALTERNATIVE_SOURCE, SHOW_ALTERNATIVE_SOURCE);
|
||||||
addBoolIfDiffers(set, settings, sDefault, s -> s.ENABLE_MEMORY_AGENT, ENABLE_MEMORY_AGENT);
|
addBoolIfDiffers(set, settings, sDefault, s -> s.ENABLE_MEMORY_AGENT, ENABLE_MEMORY_AGENT);
|
||||||
addBoolIfDiffers(set, settings, sDefault, s -> s.ALWAYS_SMART_STEP_INTO, ALWAYS_SMART_STEP_INTO);
|
addBoolIfDiffers(set, settings, sDefault, s -> s.ALWAYS_SMART_STEP_INTO, ALWAYS_SMART_STEP_INTO);
|
||||||
|
|||||||
@@ -230,7 +230,6 @@ label.debugger.hotswap.configurable.reload.classes=Reload classes after compilat
|
|||||||
label.debugger.hotswap.configurable.always=&Always
|
label.debugger.hotswap.configurable.always=&Always
|
||||||
label.debugger.hotswap.configurable.never=&Never
|
label.debugger.hotswap.configurable.never=&Never
|
||||||
label.debugger.hotswap.configurable.ask=As&k
|
label.debugger.hotswap.configurable.ask=As&k
|
||||||
label.debugger.launching.configurable.disable.jit=Disable JIT
|
|
||||||
label.debugger.launching.configurable.debugger.transport=Transport:
|
label.debugger.launching.configurable.debugger.transport=Transport:
|
||||||
label.debugger.launching.configurable.socket=&Socket
|
label.debugger.launching.configurable.socket=&Socket
|
||||||
label.debugger.launching.configurable.shmem=Shared &memory
|
label.debugger.launching.configurable.shmem=Shared &memory
|
||||||
|
|||||||
@@ -63,12 +63,6 @@ idea.jars.nocopy=false
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
idea.no.launcher=false
|
idea.no.launcher=false
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
# The VM option value to be used start the JVM in debug mode.
|
|
||||||
# Some environments define it in a different way (-XXdebug in Oracle VM)
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
idea.xdebug.key=-Xdebug
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# Switch into JMX 1.0 compatible mode
|
# Switch into JMX 1.0 compatible mode
|
||||||
# Uncomment this option to be able to run IDEA using J2SDK 1.5 while working
|
# Uncomment this option to be able to run IDEA using J2SDK 1.5 while working
|
||||||
|
|||||||
Reference in New Issue
Block a user