Skip to content

Commit

Permalink
Merge pull request quarkusio#35736 from galderz/topic.0905.enable-hea…
Browse files Browse the repository at this point in the history
…pdump

Enable native heap dump monitoring by default
  • Loading branch information
gsmet authored Sep 12, 2023
2 parents 3cafdff + 8eceb71 commit e724332
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -890,13 +890,15 @@ public NativeImageInvokerInfo build() {
addExperimentalVMOption(nativeImageArgs, "-H:+AllowVMInspection");
}

List<NativeConfig.MonitoringOption> monitoringOptions = new ArrayList<>();
monitoringOptions.add(NativeConfig.MonitoringOption.HEAPDUMP);
if (nativeConfig.monitoring().isPresent()) {
List<NativeConfig.MonitoringOption> monitoringOptions = nativeConfig.monitoring().get();
if (!monitoringOptions.isEmpty()) {
nativeImageArgs.add("--enable-monitoring=" + monitoringOptions.stream()
.map(o -> o.name().toLowerCase(Locale.ROOT)).collect(Collectors.joining(",")));
}
monitoringOptions.addAll(nativeConfig.monitoring().get());
}
nativeImageArgs.add("--enable-monitoring=" + monitoringOptions.stream()
.distinct()
.map(o -> o.name().toLowerCase(Locale.ROOT)).collect(Collectors.joining(",")));

if (nativeConfig.autoServiceLoaderRegistration()) {
addExperimentalVMOption(nativeImageArgs, "-H:+UseServiceLoaderFeature");
//When enabling, at least print what exactly is being added:
Expand Down

0 comments on commit e724332

Please sign in to comment.