Add current reports for strict example

This commit is contained in:
Jason T. Greene
2018-09-10 23:46:47 -05:00
parent 38a60de226
commit b534decc5c
4 changed files with 28110 additions and 1 deletions

View File

@@ -182,6 +182,8 @@
<configuration>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableRetainedHeapReporting>true</enableRetainedHeapReporting>
<enableCodeSizeReporting>true</enableCodeSizeReporting>
<graalvmHome>${graalvmHome}</graalvmHome>
</configuration>
</execution>
@@ -193,4 +195,4 @@
</profiles>
</project>
</project>

View File

@@ -48,6 +48,12 @@ public class NativeImageMojo extends AbstractMojo {
@Parameter
private boolean enableHttpUrlHandler;
@Parameter
private boolean enableRetainedHeapReporting;
@Parameter
private boolean enableCodeSizeReporting;
@Parameter(defaultValue = "${env.GRAALVM_HOME}")
private String graalvmHome;
@@ -99,6 +105,13 @@ public class NativeImageMojo extends AbstractMojo {
if(enableHttpUrlHandler) {
command.add("-H:EnableURLProtocols=http");
}
if (enableRetainedHeapReporting) {
command.add("-H:+PrintRetainedHeapHistogram");
}
if (enableCodeSizeReporting) {
command.add("-H:+PrintCodeSizeReport");
}
//command.add("-H:+AllowVMInspection");
System.out.println(command);
Process process = Runtime.getRuntime().exec(command.toArray(new String[0]), null, outputDirectory);