Skip to content

Commit b4f1b23

Browse files
author
Andrija Kolic
committed
Rename the option to ImageHeapMetadataDumpFileName; make sure to specify that the feature refers to the image heap specifically.
1 parent 5489477 commit b4f1b23

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,10 +1370,10 @@ public Boolean getValue(OptionValues values) {
13701370
@Option(help = "Create a heap dump and exit.")//
13711371
public static final RuntimeOptionKey<Boolean> DumpHeapAndExit = new RuntimeOptionKey<>(false, Immutable);
13721372

1373-
@Option(help = "Name of a csv file into which heap metadata should be dumped. " +
1373+
@Option(help = "Name of a csv file into which image heap metadata should be dumped. " +
13741374
"This csv file will be located in the same directory as the image. " +
13751375
"If this option is an empty string, the metadata will not be dumped.") //
1376-
public static final HostedOptionKey<String> HeapMetadataDumpFileName = new HostedOptionKey<>("");
1376+
public static final HostedOptionKey<String> ImageHeapMetadataDumpFileName = new HostedOptionKey<>("");
13771377

13781378
@Option(help = "Print some VM information and exit.")//
13791379
public static final RuntimeOptionKey<Boolean> PrintVMInfoAndExit = new RuntimeOptionKey<>(false, Immutable);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,10 +799,10 @@ public ObjectInfo addLateToImageHeap(Object object, Object reason) {
799799
}
800800

801801
/**
802-
* Dumps metadata for every object in the heap.
802+
* Dumps metadata for every object in the image heap.
803803
*/
804804
public void dumpMetadata() {
805-
String metadataFileName = SubstrateOptions.HeapMetadataDumpFileName.getValue();
805+
String metadataFileName = SubstrateOptions.ImageHeapMetadataDumpFileName.getValue();
806806
if (metadataFileName == null || metadataFileName.isEmpty()) {
807807
// Do not dump metadata if the file name isn't set
808808
return;
@@ -812,7 +812,7 @@ public void dumpMetadata() {
812812
File metadataFile = metadataFilePath.toFile();
813813
String metadataDir = metadataFile.getParent();
814814
if (!new File(metadataDir).exists()) {
815-
throw VMError.shouldNotReachHere("Heap metadata directory does not exist: " + metadataDir);
815+
throw VMError.shouldNotReachHere("Image heap metadata directory does not exist: " + metadataDir);
816816
}
817817

818818
try (FileWriter metadataOut = new FileWriter(metadataFile);
@@ -823,7 +823,7 @@ public void dumpMetadata() {
823823
metadataBw.write(csvLine);
824824
}
825825
} catch (IOException ex) {
826-
throw new RuntimeException("Failed to dump heap metadata to " + metadataFile, ex);
826+
throw new RuntimeException("Failed to dump image heap metadata to " + metadataFile, ex);
827827
}
828828
}
829829

0 commit comments

Comments
 (0)