Skip to content

Commit

Permalink
Merge pull request #4734 from johnaohara/enableReports
Browse files Browse the repository at this point in the history
Disable native image PrintAnalysisCallTree by default, change semantics to 'enabledReports=true'
  • Loading branch information
gsmet authored Oct 22, 2019
2 parents 401d9d8 + 0869857 commit 994427c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public class NativeConfig {
* If reporting on call paths should be enabled
*/
@ConfigItem(defaultValue = "false")
public boolean disableReports;
public boolean enableReports;

/**
* Additional arguments to pass to the build process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa
if (nativeConfig.debugBuildProcess) {
command.add("-J-Xrunjdwp:transport=dt_socket,address=" + DEBUG_BUILD_PROCESS_PORT + ",server=y,suspend=y");
}
if (!nativeConfig.disableReports) {
if (nativeConfig.enableReports) {
command.add("-H:+PrintAnalysisCallTree");
}
if (nativeConfig.dumpProxies) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class QuarkusNative extends QuarkusTask {

private boolean fullStackTraces = true;

private boolean disableReports;
private boolean enableReports;

private List<String> additionalBuildArgs;

Expand Down Expand Up @@ -343,13 +343,19 @@ public void setFullStackTraces(boolean fullStackTraces) {

@Optional
@Input
public boolean isDisableReports() {
return disableReports;
public boolean isEnableReports() {
return enableReports;
}

@Deprecated
@Option(description = "Disable reports", option = "disable-reports")
public void setDisableReports(boolean disableReports) {
this.disableReports = disableReports;
this.enableReports = !disableReports;
}

@Option(description = "Enable reports", option = "enable-reports")
public void setEnableReports(boolean enableReports) {
this.enableReports = enableReports;
}

@Optional
Expand Down Expand Up @@ -435,7 +441,7 @@ public void accept(ConfigBuilder configBuilder) {
configs.add("quarkus.native.debug-build-process", debugBuildProcess);

configs.add("quarkus.native.debug-symbols", debugSymbols);
configs.add("quarkus.native.disable-reports", disableReports);
configs.add("quarkus.native.enable-reports", enableReports);
if (dockerBuild != null) {
configs.add("quarkus.native.docker-build", dockerBuild);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,13 @@ public class NativeImageMojo extends AbstractMojo {
@Parameter(defaultValue = "true")
private Boolean fullStackTraces;

@Deprecated
@Parameter(defaultValue = "${native-image.disable-reports}")
private Boolean disableReports;

@Parameter(defaultValue = "${native-image.enable-reports}")
private Boolean enableReports;

@Parameter
private List<String> additionalBuildArgs;

Expand Down Expand Up @@ -333,7 +337,10 @@ public void accept(ConfigBuilder configBuilder) {
configs.add("quarkus.native.debug-symbols", debugSymbols.toString());
}
if (disableReports != null) {
configs.add("quarkus.native.disable-reports", disableReports.toString());
configs.add("quarkus.native.enable-reports", new Boolean(!disableReports).toString());
}
if (enableReports != null) {
configs.add("quarkus.native.enable-reports", enableReports.toString());
}
if (containerRuntime != null) {
configs.add("quarkus.native.container-runtime", containerRuntime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
<enableReports>false</enableReports>
</configuration>
</execution>
</executions>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/elytron-security-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
<enableReports>false</enableReports>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
<enableReports>false</enableReports>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 994427c

Please sign in to comment.