Skip to content

Commit

Permalink
Don't pass '--enable-monitoring=heapdump' unconditionally on windows
Browse files Browse the repository at this point in the history
The feature is not supported on Windows

Closes quarkusio#43895
  • Loading branch information
zakkak committed Oct 16, 2024
1 parent fe164e0 commit ac3e7b3
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -932,13 +932,18 @@ public NativeImageInvokerInfo build() {
}

List<NativeConfig.MonitoringOption> monitoringOptions = new ArrayList<>();
monitoringOptions.add(NativeConfig.MonitoringOption.HEAPDUMP);
if (!SystemUtils.IS_OS_WINDOWS || containerBuild) {
// --enable-monitoring=heapdump is not supported on Windows
monitoringOptions.add(NativeConfig.MonitoringOption.HEAPDUMP);
}
if (nativeConfig.monitoring().isPresent()) {
monitoringOptions.addAll(nativeConfig.monitoring().get());
}
nativeImageArgs.add("--enable-monitoring=" + monitoringOptions.stream()
.distinct()
.map(o -> o.name().toLowerCase(Locale.ROOT)).collect(Collectors.joining(",")));
if (!monitoringOptions.isEmpty()) {
nativeImageArgs.add("--enable-monitoring=" + monitoringOptions.stream()
.distinct()
.map(o -> o.name().toLowerCase(Locale.ROOT)).collect(Collectors.joining(",")));
}

if (nativeConfig.autoServiceLoaderRegistration()) {
addExperimentalVMOption(nativeImageArgs, "-H:+UseServiceLoaderFeature");
Expand Down

0 comments on commit ac3e7b3

Please sign in to comment.