From a684e3814b65c9e24dabb8f5c7476b1a181bb604 Mon Sep 17 00:00:00 2001 From: Manyanda Chitimbo Date: Fri, 8 Nov 2019 13:27:59 +0100 Subject: [PATCH] fix: remove unsupported native-image flags this remove the enableRetainedHeapReporting i.e -H:+PrintRetainedHeapHistogram and enableCodeSizeReporting i.e -H:+PrintCodeSizeReport fixes #5324 --- .../quarkus/deployment/pkg/NativeConfig.java | 12 -------- .../pkg/steps/NativeImageBuildStep.java | 7 +---- .../quarkus/gradle/tasks/QuarkusNative.java | 28 ------------------- .../io/quarkus/maven/NativeImageMojo.java | 18 +++--------- integration-tests/artemis-core/pom.xml | 4 --- integration-tests/artemis-jms/pom.xml | 4 --- .../elytron-security-oauth2/pom.xml | 4 --- integration-tests/elytron-security/pom.xml | 4 --- .../hibernate-orm-panache/pom.xml | 4 --- .../hibernate-search-elasticsearch/pom.xml | 4 --- integration-tests/hibernate-validator/pom.xml | 4 --- integration-tests/jpa-mariadb/pom.xml | 6 +--- integration-tests/jpa-mysql/pom.xml | 4 --- integration-tests/jpa-postgresql/pom.xml | 6 +--- integration-tests/jsonb/pom.xml | 6 +--- integration-tests/kafka/pom.xml | 4 --- .../keycloak-authorization/pom.xml | 10 ++----- integration-tests/main/pom.xml | 4 --- integration-tests/oidc-code-flow/pom.xml | 6 +--- integration-tests/oidc/pom.xml | 6 +--- integration-tests/test-extension/pom.xml | 4 --- integration-tests/vault-app/pom.xml | 4 --- 22 files changed, 13 insertions(+), 140 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java index e1ace83ee5854..ecc33b77a2b89 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java @@ -91,18 +91,6 @@ public class NativeConfig { @ConfigItem(defaultValue = "false") public boolean cleanupServer; - /** - * This will report on the size of the retained heap after image build - */ - @ConfigItem(defaultValue = "false") - public boolean enableRetainedHeapReporting; - - /** - * This enables reporting of the code size of the native image - */ - @ConfigItem(defaultValue = "false") - public boolean enableCodeSizeReporting; - /** * If isolates should be enabled */ diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java index fa90182df8b14..672366ed6ae2d 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java @@ -232,12 +232,7 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa if (!noPIE.isEmpty()) { command.add("-H:NativeLinkerOption=" + noPIE); } - if (nativeConfig.enableRetainedHeapReporting) { - command.add("-H:+PrintRetainedHeapHistogram"); - } - if (nativeConfig.enableCodeSizeReporting) { - command.add("-H:+PrintCodeSizeReport"); - } + if (!nativeConfig.enableIsolates) { command.add("-H:-SpawnIsolates"); } diff --git a/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java b/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java index 6bf9329ffaa66..83d73c7976af4 100644 --- a/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java +++ b/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java @@ -44,12 +44,8 @@ public class QuarkusNative extends QuarkusTask { private boolean enableAllSecurityServices; - private boolean enableRetainedHeapReporting; - private boolean enableIsolates; - private boolean enableCodeSizeReporting; - private String graalvmHome = System.getenv("GRAALVM_HOME"); private boolean enableServer = false; @@ -187,17 +183,6 @@ public void setEnableAllSecurityServices(boolean enableAllSecurityServices) { this.enableAllSecurityServices = enableAllSecurityServices; } - @Optional - @Input - public boolean isEnableRetainedHeapReporting() { - return enableRetainedHeapReporting; - } - - @Option(description = "Specify if retained heap reporting should be enabled", option = "enable-retained-heap-reporting") - public void setEnableRetainedHeapReporting(boolean enableRetainedHeapReporting) { - this.enableRetainedHeapReporting = enableRetainedHeapReporting; - } - @Optional @Input public boolean isEnableIsolates() { @@ -209,17 +194,6 @@ public void setEnableIsolates(boolean enableIsolates) { this.enableIsolates = enableIsolates; } - @Optional - @Input - public boolean isEnableCodeSizeReporting() { - return enableCodeSizeReporting; - } - - @Option(description = "Report errors at runtime", option = "enable-code-size-reporting") - public void setEnableCodeSizeReporting(boolean enableCodeSizeReporting) { - this.enableCodeSizeReporting = enableCodeSizeReporting; - } - @Optional @Input public String getGraalvmHome() { @@ -464,14 +438,12 @@ public void accept(ConfigBuilder configBuilder) { } configs.add("quarkus.native.dump-proxies", dumpProxies); configs.add("quarkus.native.enable-all-security-services", enableAllSecurityServices); - configs.add("quarkus.native.enable-code-size-reporting", enableCodeSizeReporting); configs.add("quarkus.native.enable-fallback-images", enableFallbackImages); configs.add("quarkus.native.enable-https-url-handler", enableHttpsUrlHandler); configs.add("quarkus.native.enable-http-url-handler", enableHttpUrlHandler); configs.add("quarkus.native.enable-isolates", enableIsolates); configs.add("quarkus.native.enable-jni", enableJni); - configs.add("quarkus.native.enable-retained-heap-reporting", enableRetainedHeapReporting); configs.add("quarkus.native.enable-server", enableServer); diff --git a/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java index 7678980dc519f..f69dab9920482 100644 --- a/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java +++ b/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java @@ -91,15 +91,9 @@ public class NativeImageMojo extends AbstractMojo { @Parameter private Boolean enableAllSecurityServices; - @Parameter - private Boolean enableRetainedHeapReporting; - @Parameter private Boolean enableIsolates; - @Parameter - private Boolean enableCodeSizeReporting; - @Parameter(defaultValue = "${env.GRAALVM_HOME}") private String graalvmHome; @@ -365,9 +359,6 @@ public void accept(ConfigBuilder configBuilder) { if (enableAllSecurityServices != null) { configs.add("quarkus.native.enable-all-security-services", enableAllSecurityServices.toString()); } - if (enableCodeSizeReporting != null) { - configs.add("quarkus.native.enable-code-size-reporting", enableCodeSizeReporting.toString()); - } if (enableFallbackImages != null) { configs.add("quarkus.native.enable-fallback-images", enableFallbackImages.toString()); } @@ -383,12 +374,11 @@ public void accept(ConfigBuilder configBuilder) { if (enableJni != null) { configs.add("quarkus.native.enable-jni", enableJni.toString()); } - if (enableRetainedHeapReporting != null) { - configs.add("quarkus.native.enable-retained-heap-reporting", enableRetainedHeapReporting.toString()); - } + if (enableServer != null) { configs.add("quarkus.native.enable-server", enableServer.toString()); } + if (enableVMInspection != null) { configs.add("quarkus.native.enable-vm-inspection", enableVMInspection.toString()); } @@ -396,13 +386,13 @@ public void accept(ConfigBuilder configBuilder) { configs.add("quarkus.native.full-stack-traces", fullStackTraces.toString()); } if (graalvmHome != null && !graalvmHome.trim().isEmpty()) { - configs.add("quarkus.native.graalvm-home", graalvmHome.toString()); + configs.add("quarkus.native.graalvm-home", graalvmHome); } if (javaHome != null && !javaHome.toString().isEmpty()) { configs.add("quarkus.native.java-home", javaHome.toString()); } if (nativeImageXmx != null && !nativeImageXmx.trim().isEmpty()) { - configs.add("quarkus.native.native-image-xmx", nativeImageXmx.toString()); + configs.add("quarkus.native.native-image-xmx", nativeImageXmx); } if (reportErrorsAtRuntime != null) { configs.add("quarkus.native.report-errors-at-runtime", reportErrorsAtRuntime.toString()); diff --git a/integration-tests/artemis-core/pom.xml b/integration-tests/artemis-core/pom.xml index 090e5a6237c0e..da1a42e3fecad 100644 --- a/integration-tests/artemis-core/pom.xml +++ b/integration-tests/artemis-core/pom.xml @@ -120,10 +120,6 @@ true true - ${graalvmHome} diff --git a/integration-tests/artemis-jms/pom.xml b/integration-tests/artemis-jms/pom.xml index 0cb6ab92e36a2..80a3f7ca3ef8d 100644 --- a/integration-tests/artemis-jms/pom.xml +++ b/integration-tests/artemis-jms/pom.xml @@ -120,10 +120,6 @@ true true - ${graalvmHome} diff --git a/integration-tests/elytron-security-oauth2/pom.xml b/integration-tests/elytron-security-oauth2/pom.xml index 2ebd218f78801..34d887bb3b624 100644 --- a/integration-tests/elytron-security-oauth2/pom.xml +++ b/integration-tests/elytron-security-oauth2/pom.xml @@ -120,10 +120,6 @@ true true - ${graalvmHome} diff --git a/integration-tests/elytron-security/pom.xml b/integration-tests/elytron-security/pom.xml index 990b517659e33..892920ca7d7a0 100644 --- a/integration-tests/elytron-security/pom.xml +++ b/integration-tests/elytron-security/pom.xml @@ -109,10 +109,6 @@ true true - ${graalvmHome} diff --git a/integration-tests/hibernate-orm-panache/pom.xml b/integration-tests/hibernate-orm-panache/pom.xml index 1bb24f146b847..c71ab4cb7154a 100644 --- a/integration-tests/hibernate-orm-panache/pom.xml +++ b/integration-tests/hibernate-orm-panache/pom.xml @@ -131,10 +131,6 @@ true false false - ${graalvmHome} false diff --git a/integration-tests/hibernate-search-elasticsearch/pom.xml b/integration-tests/hibernate-search-elasticsearch/pom.xml index 2be65edac0c53..c607395b7cd09 100644 --- a/integration-tests/hibernate-search-elasticsearch/pom.xml +++ b/integration-tests/hibernate-search-elasticsearch/pom.xml @@ -184,10 +184,6 @@ true false false - ${graalvmHome} false false diff --git a/integration-tests/hibernate-validator/pom.xml b/integration-tests/hibernate-validator/pom.xml index d89e72664fbe0..780f306fd868e 100644 --- a/integration-tests/hibernate-validator/pom.xml +++ b/integration-tests/hibernate-validator/pom.xml @@ -121,10 +121,6 @@ true false false - ${graalvmHome} false diff --git a/integration-tests/jpa-mariadb/pom.xml b/integration-tests/jpa-mariadb/pom.xml index 94468418d8b14..8c3eb78e8778f 100644 --- a/integration-tests/jpa-mariadb/pom.xml +++ b/integration-tests/jpa-mariadb/pom.xml @@ -104,7 +104,7 @@ - + native-image @@ -147,10 +147,6 @@ true false false - ${graalvmHome} false false diff --git a/integration-tests/jpa-mysql/pom.xml b/integration-tests/jpa-mysql/pom.xml index 5ad99cb1e968a..6d747ecaefd67 100644 --- a/integration-tests/jpa-mysql/pom.xml +++ b/integration-tests/jpa-mysql/pom.xml @@ -147,10 +147,6 @@ true false false - ${graalvmHome} false false diff --git a/integration-tests/jpa-postgresql/pom.xml b/integration-tests/jpa-postgresql/pom.xml index d412ae1d36796..f9a9a9ab2d07e 100644 --- a/integration-tests/jpa-postgresql/pom.xml +++ b/integration-tests/jpa-postgresql/pom.xml @@ -99,7 +99,7 @@ - + native-image @@ -142,10 +142,6 @@ true false false - ${graalvmHome} false diff --git a/integration-tests/jsonb/pom.xml b/integration-tests/jsonb/pom.xml index 962a25b0c7e66..0c2a2cba3ba3a 100644 --- a/integration-tests/jsonb/pom.xml +++ b/integration-tests/jsonb/pom.xml @@ -97,10 +97,6 @@ true true - ${graalvmHome} @@ -110,4 +106,4 @@ - \ No newline at end of file + diff --git a/integration-tests/kafka/pom.xml b/integration-tests/kafka/pom.xml index 48849a0d00755..73b2db11473d4 100644 --- a/integration-tests/kafka/pom.xml +++ b/integration-tests/kafka/pom.xml @@ -133,10 +133,6 @@ true true - ${graalvmHome} diff --git a/integration-tests/keycloak-authorization/pom.xml b/integration-tests/keycloak-authorization/pom.xml index db508843ceefc..3719a82bc7917 100644 --- a/integration-tests/keycloak-authorization/pom.xml +++ b/integration-tests/keycloak-authorization/pom.xml @@ -17,7 +17,7 @@ http://localhost:8180/auth - + io.quarkus @@ -164,10 +164,6 @@ true false false - ${graalvmHome} false @@ -207,8 +203,8 @@ admin admin - -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true - -Djava.awt.headless=true + -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true + -Djava.awt.headless=true -Dkeycloak.profile.feature.upload_scripts=enabled diff --git a/integration-tests/main/pom.xml b/integration-tests/main/pom.xml index dc876bd17f22e..1cb2f3a6cddcd 100644 --- a/integration-tests/main/pom.xml +++ b/integration-tests/main/pom.xml @@ -242,10 +242,6 @@ true true true - ${graalvmHome} diff --git a/integration-tests/oidc-code-flow/pom.xml b/integration-tests/oidc-code-flow/pom.xml index 08a177230f7b9..74b347317e2a2 100644 --- a/integration-tests/oidc-code-flow/pom.xml +++ b/integration-tests/oidc-code-flow/pom.xml @@ -18,7 +18,7 @@ http://localhost:8180/auth 2.36.0 - + io.quarkus @@ -187,10 +187,6 @@ true false false - ${graalvmHome} false diff --git a/integration-tests/oidc/pom.xml b/integration-tests/oidc/pom.xml index e2d1e290b62b0..15595eddf7acd 100644 --- a/integration-tests/oidc/pom.xml +++ b/integration-tests/oidc/pom.xml @@ -17,7 +17,7 @@ http://localhost:8180/auth - + io.quarkus @@ -170,10 +170,6 @@ true false false - ${graalvmHome} false diff --git a/integration-tests/test-extension/pom.xml b/integration-tests/test-extension/pom.xml index bbf42382475c6..1ef0f36bb2b0c 100644 --- a/integration-tests/test-extension/pom.xml +++ b/integration-tests/test-extension/pom.xml @@ -102,10 +102,6 @@ true true - ${graalvmHome} diff --git a/integration-tests/vault-app/pom.xml b/integration-tests/vault-app/pom.xml index 741fa9ad27256..1882ce4c3713d 100644 --- a/integration-tests/vault-app/pom.xml +++ b/integration-tests/vault-app/pom.xml @@ -171,10 +171,6 @@ true false false - ${graalvmHome} false