Skip to content

Commit

Permalink
[SUREFIRE-1858] Change default debug options to not use legacy options
Browse files Browse the repository at this point in the history
Using the -Xdebug -Xnoagent -Djava.compiler=NONE causes the OpenJ9 JVM to run the tests in interpreted mode, thus running them VERY slowly. In Hotspot JVM these options are ignored.
  • Loading branch information
Thihup authored Oct 28, 2020
1 parent 8ad2d73 commit d033faa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2570,8 +2570,7 @@ private String getEffectiveDebugForkedProcess()
String debugForkedProcess = getDebugForkedProcess();
if ( "true".equals( debugForkedProcess ) )
{
return "-Xdebug -Xnoagent -Djava.compiler=NONE"
+ " -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005";
return "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005";
}
return debugForkedProcess;
}
Expand Down
4 changes: 2 additions & 2 deletions maven-surefire-plugin/src/site/apt/examples/debugging.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ mvn -Dmaven.${thisPlugin.toLowerCase()}.debug verify

#{if}(${project.artifactId}=="maven-surefire-plugin")
+---+
mvn -Dmaven.${thisPlugin.toLowerCase()}.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" test
mvn -Dmaven.${thisPlugin.toLowerCase()}.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:8000" test
+---+
#{else}
+---+
mvn -Dmaven.${thisPlugin.toLowerCase()}.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" verify
mvn -Dmaven.${thisPlugin.toLowerCase()}.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:8000" verify
+---+
#{end}

Expand Down

0 comments on commit d033faa

Please sign in to comment.