Skip to content

Commit 46a2e20

Browse files
committed
Comment builderArguments and builderProperties
1 parent 15cc174 commit 46a2e20

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImageDebugInfoFeature.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,18 @@ public boolean isLoadable() {
122122

123123
var imageClassLoader = accessImpl.getImageClassLoader();
124124

125-
var builderArguments = imageClassLoader.classLoaderSupport.getHostedOptionParser().getArguments();
126-
objectFile.newUserDefinedSection(".debug.svm.imagebuild.arguments", makeSectionImpl.apply(builderArguments));
127-
128125
var classPath = imageClassLoader.classpath().stream().map(Path::toString).collect(Collectors.toList());
129126
objectFile.newUserDefinedSection(".debug.svm.imagebuild.classpath", makeSectionImpl.apply(classPath));
130127
var modulePath = imageClassLoader.modulepath().stream().map(Path::toString).collect(Collectors.toList());
131128
objectFile.newUserDefinedSection(".debug.svm.imagebuild.modulepath", makeSectionImpl.apply(modulePath));
132-
133-
var sortedPropertiesList = ManagementFactory.getRuntimeMXBean().getInputArguments().stream()
129+
/* Get original arguments that got passed to the builder when it got started */
130+
var builderArguments = imageClassLoader.classLoaderSupport.getHostedOptionParser().getArguments();
131+
objectFile.newUserDefinedSection(".debug.svm.imagebuild.arguments", makeSectionImpl.apply(builderArguments));
132+
/* System properties that got passed to the VM that runs the builder */
133+
var builderProperties = ManagementFactory.getRuntimeMXBean().getInputArguments().stream()
134134
.filter(arg -> arg.startsWith("-D"))
135135
.sorted().collect(Collectors.toList());
136-
objectFile.newUserDefinedSection(".debug.svm.imagebuild.java.properties", makeSectionImpl.apply(sortedPropertiesList));
136+
objectFile.newUserDefinedSection(".debug.svm.imagebuild.java.properties", makeSectionImpl.apply(builderProperties));
137137
}
138138
}
139139
ProgressReporter.singleton().setDebugInfoTimer(timer);

0 commit comments

Comments
 (0)