]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7653 remove Java option XX:MaxPermSize
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 26 May 2016 13:33:54 +0000 (15:33 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 26 May 2016 14:02:28 +0000 (16:02 +0200)
this option is dropped from java 8

12 files changed:
it/it-tests/src/test/java/it/plugins/PluginsTest.java
pom.xml
server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java
sonar-application/src/main/assembly/conf/sonar.properties
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/computation/ComputationTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/BootstrappingTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/FileSystemTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/HighlightingTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/MemoryTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/ScannerPerfTestSuite.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/server/ServerTest.java

index ec97a4a1b45de354576e4c70426f66ec4ad99c1c..f0b6059323c94653331ee95795ce3eb84e88b59c 100644 (file)
@@ -141,7 +141,6 @@ public class PluginsTest {
 
   private static SonarScanner newAnalysis() {
     SonarScanner analysis = SonarScanner.create(Project.basedir());
-    analysis.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-XX:MaxPermSize=128m");
 
     // required to bypass usage of build-wrapper
     analysis.setProperties("sonar.cfamily.build-wrapper-output.bypass", "true");
diff --git a/pom.xml b/pom.xml
index 2896622c35cc475ca1777fbb47ace21b7ff1c775..d248f5c9442c1e7493ab41cb1d96342bb9d07226 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,7 @@
     <skipServerTests>false</skipServerTests>
     <skipSanityChecks>false</skipSanityChecks>
 
-    <argLine>-Xmx512m -Djava.awt.headless=true -XX:MaxPermSize=160m</argLine>
+    <argLine>-Xmx512m -Djava.awt.headless=true</argLine>
     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
 
     <!-- used for deployment to SonarSource Artifactory -->
index 550a7014f0d5d69c8cf0ea8d557eef4847ecdfbb..57e5c7eb4502225131fac9cba1411803b058db0d 100644 (file)
@@ -115,9 +115,9 @@ public class ProcessProperties {
       "-XX:+HeapDumpOnOutOfMemoryError");
     defaults.put(ProcessProperties.SEARCH_JAVA_ADDITIONAL_OPTS, "");
 
-    defaults.put(ProcessProperties.WEB_JAVA_OPTS, "-Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
+    defaults.put(ProcessProperties.WEB_JAVA_OPTS, "-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
     defaults.put(ProcessProperties.WEB_JAVA_ADDITIONAL_OPTS, "");
-    defaults.put(ProcessProperties.CE_JAVA_OPTS, "-Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
+    defaults.put(ProcessProperties.CE_JAVA_OPTS, "-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
     defaults.put(ProcessProperties.CE_JAVA_ADDITIONAL_OPTS, "");
     defaults.put(ProcessProperties.JDBC_MAX_ACTIVE, "60");
     defaults.put(ProcessProperties.JDBC_MAX_IDLE, "5");
index e816df502959db9a0c3056b39ac9d83e415fda61..fc40e150757147d8b0534ea18415cdb5067e89bb 100644 (file)
@@ -88,7 +88,7 @@
 #    The HotSpot Server VM is recommended. The property -server should be added if server mode
 #    is not enabled by default on your environment: http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html
 #
-#sonar.web.javaOpts=-Xmx512m -Xms128m  -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
+#sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
 
 # Same as previous property, but allows to not repeat all other settings like -Xmx
 #sonar.web.javaAdditionalOpts=
 #    The HotSpot Server VM is recommended. The property -server should be added if server mode
 #    is not enabled by default on your environment: http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html
 #
-#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
+#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
 
 # Same as previous property, but allows to not repeat all other settings like -Xmx
 #sonar.ce.javaAdditionalOpts=
index 86d305c6ab5619c5a16e5ff0e0a0750b71bb503c..b720db5564cd483b6ac0a9cc388d474196f651fe 100644 (file)
@@ -48,7 +48,7 @@ public class ComputationTest extends PerfTestCase {
     .addPlugin(FileLocation.byWildcardMavenFilename(new File("../../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar"))
     .setServerProperty(
       "sonar.web.javaOpts",
-      String.format("-Xms%dm -Xmx%dm -XX:+HeapDumpOnOutOfMemoryError -XX:MaxPermSize=160m -Djava.awt.headless=true", MAX_HEAP_SIZE_IN_MEGA, MAX_HEAP_SIZE_IN_MEGA))
+      String.format("-Xms%dm -Xmx%dm -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true", MAX_HEAP_SIZE_IN_MEGA, MAX_HEAP_SIZE_IN_MEGA))
     .setServerProperty("sonar.log.level", "DEBUG")
     .restoreProfileAtStartup(FileLocation.ofClasspath("/one-xoo-issue-per-line.xml"))
     .build();
index c14bf582c3385e0d538ebedcbb3f6b41bd121394..14d260f163965c04befd74e8be7edd34b5b18208 100644 (file)
@@ -75,7 +75,7 @@ public class BootstrappingTest extends PerfTestCase {
         "sonar.sources", "",
         "sonar.showProfiling", "true");
     scanner
-      .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m")
+      .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server")
       .setProjectDir(manyFlatModulesBaseDir);
 
     BuildResult result = orchestrator.executeBuild(scanner);
@@ -117,7 +117,7 @@ public class BootstrappingTest extends PerfTestCase {
         "sonar.projectVersion", "1.0",
         "sonar.sources", "",
         "sonar.showProfiling", "true");
-    scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m");
+    scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server");
     scanner.setProjectDir(manyNestedModulesBaseDir);
 
     BuildResult result = orchestrator.executeBuild(scanner);
index e1ba5264111f29e66eaf3327bf827a677273678a..d9987051f3d846b405a09678133508b8748ddb8d 100644 (file)
@@ -79,7 +79,7 @@ public class FileSystemTest extends PerfTestCase {
         "sonar.sources", "src",
         "sonar.analysis.mode", "issues",
         "sonar.showProfiling", "true")
-      .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx" + xmx + "m -server -XX:MaxPermSize=64m")
+      .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx" + xmx + "m -server")
       .setProjectDir(baseDir);
 
     orchestrator.executeBuild(runner);
index 615cf6a976f47189977a35f06c966c7affb35a8c..4cac738fdfea96114e988e4275c9353ac88a6fdd 100644 (file)
@@ -92,7 +92,7 @@ public class HighlightingTest extends PerfTestCase {
         "sonar.projectVersion", "1.0",
         "sonar.sources", "src",
         "sonar.showProfiling", "true");
-    scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m")
+    scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server")
       .setProjectDir(baseDir);
 
     BuildResult result = orchestrator.executeBuild(scanner);
index fd930cd5ee2c13621f69e71f07a4b715116c6a32..046e1309f51a51ffdb85c13a8eeb1dd6147b96b7 100644 (file)
@@ -59,7 +59,7 @@ public class IssuesModeTest extends PerfTestCase {
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-xoo-issue-per-line");
     SonarScanner runner = newScanner(
-      "-Xmx512m -server -XX:MaxPermSize=64m",
+      "-Xmx512m -server",
       "sonar.analysis.mode", "issues",
       "sonar.userHome", userHome.getAbsolutePath(),
       "sonar.showProfiling", "true");
index ce903b565903861c97fe9f1918306b254d645404..c6d6412e18d105eabe0381dc4e071e84cba2424a 100644 (file)
@@ -85,7 +85,7 @@ public class MemoryTest extends PerfTestCase {
         "sonar.projectVersion", "1.0",
         "sonar.sources", "",
         "sonar.showProfiling", "true");
-    scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m")
+    scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server")
       .setProjectDir(baseDir);
 
     BuildResult result = orchestrator.executeBuild(scanner);
index 7365b8f5da998987a93e8ee0dae1ba1c048cf919..cc3c679307734110cf3697b9bcfc46ed2b83bc9c 100644 (file)
@@ -45,7 +45,7 @@ public class ScannerPerfTestSuite {
     .builderEnv()
     .addPlugin(FileLocation.byWildcardMavenFilename(new File("../../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar"))
     // should not be so high, but required as long embedded h2 is used -> requires more memory on server
-    .setServerProperty("sonar.web.javaOpts", "-Xmx1G -XX:MaxPermSize=100m -XX:+HeapDumpOnOutOfMemoryError")
+    .setServerProperty("sonar.web.javaOpts", "-Xmx1G -XX:+HeapDumpOnOutOfMemoryError")
     // Needed by DuplicationTest::hugeJavaFile
     .setOrchestratorProperty("javaVersion", "LATEST_RELEASE").addPlugin("java")
     .restoreProfileAtStartup(FileLocation.ofClasspath("/one-xoo-issue-per-line.xml"))
index ca2520b024713b4148bb0431de060c5ef6a3af0e..d0c17e807ff158f82a72648ab80c92b01edeb493 100644 (file)
@@ -40,7 +40,7 @@ public class ServerTest extends PerfTestCase {
   // ES + TOMCAT
   @Test
   public void server_startup_and_shutdown() throws Exception {
-    String defaultWebJavaOptions = "-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false";
+    String defaultWebJavaOptions = "-Xmx768m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false";
     Orchestrator orchestrator = Orchestrator.builderEnv()
       .setOrchestratorProperty("javaVersion", "LATEST_RELEASE")
       .addPlugin("java")