Skip to content

Commit

Permalink
Use -H:PrintAnalysisCallTreeType=CSV to generate csv call tree files
Browse files Browse the repository at this point in the history
Fixes quarkusio#20733

(cherry picked from commit 4db18bc)
  • Loading branch information
zakkak authored and gsmet committed May 5, 2022
1 parent c00f02f commit 69896e2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ static final class Version implements Comparable<Version> {
static final Version VERSION_21_2 = new Version("GraalVM 21.2", "21.2", Distribution.ORACLE);
static final Version VERSION_21_3 = new Version("GraalVM 21.3", "21.3", Distribution.ORACLE);
static final Version VERSION_21_3_0 = new Version("GraalVM 21.3.0", "21.3.0", Distribution.ORACLE);
static final Version VERSION_21_3_2 = new Version("GraalVM 21.3.2", "21.3.2", Distribution.ORACLE);

static final Version MINIMUM = VERSION_21_2;
static final Version CURRENT = VERSION_21_3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,19 @@ public NativeImageInvokerInfo build() {
//address https://github.com/quarkusio/quarkus-quickstarts/issues/993
nativeImageArgs.add("-J--add-opens=java.base/java.text=ALL-UNNAMED");

if (nativeConfig.enableReports) {
if (graalVMVersion.isOlderThan(GraalVM.Version.VERSION_21_3_2)) {
nativeImageArgs.add("-H:+PrintAnalysisCallTree");
} else {
nativeImageArgs.add("-H:PrintAnalysisCallTreeType=CSV");
}
}

/*
* Any parameters following this call are forced over the user provided parameters in
* quarkus.native.additional-build-args. So if you need a parameter to be overridable through
* quarkus.native.additional-build-args please make sure to add it before this call.
*/
handleAdditionalProperties(nativeImageArgs);

nativeImageArgs.add(
Expand Down Expand Up @@ -709,9 +722,6 @@ public NativeImageInvokerInfo build() {
.add("-J-Xrunjdwp:transport=dt_socket,address=" + debugBuildProcessHost + ":"
+ DEBUG_BUILD_PROCESS_PORT + ",server=y,suspend=y");
}
if (nativeConfig.enableReports) {
nativeImageArgs.add("-H:+PrintAnalysisCallTree");
}
if (nativeConfig.dumpProxies) {
nativeImageArgs.add("-Dsun.misc.ProxyGenerator.saveGeneratedFiles=true");
}
Expand Down

0 comments on commit 69896e2

Please sign in to comment.