@@ -522,7 +522,7 @@ private void printAnalysisStatistics(AnalysisUniverse universe, Collection<Strin
522
522
}
523
523
}
524
524
if (resourceCount > 0) {
525
- l().a("%,9d %s found with %s total size", resourceCount, resourceCount == 1 ? "resource" : "resources ", ByteFormattingUtil.bytesToHuman(totalResourceSize)).println();
525
+ l().a("%,9d %s registered with %s total size", resourceCount, resourceCount == 1 ? "resource access " : "resource accesses ", ByteFormattingUtil.bytesToHuman(totalResourceSize)).println();
526
526
}
527
527
int numLibraries = libraries.size();
528
528
if (numLibraries > 0) {
@@ -592,10 +592,15 @@ public void printCreationEnd(int imageFileSize, int heapObjectCount, long imageH
592
592
String format = "%9s (%5.2f%%) for ";
593
593
l().a(format, ByteFormattingUtil.bytesToHuman(codeAreaSize), Utils.toPercentage(codeAreaSize, imageFileSize))
594
594
.doclink("code area", "#glossary-code-area").a(":%,10d compilation units", numCompilations).println();
595
- int numResources = Resources.currentLayer().resources().size();
595
+ int numResources = 0;
596
+ for (ConditionalRuntimeValue<ResourceStorageEntryBase> entry : Resources.currentLayer().resources().getValues()) {
597
+ if (entry.getValueUnconditionally() != Resources.NEGATIVE_QUERY_MARKER && entry.getValueUnconditionally() != Resources.MISSING_METADATA_MARKER) {
598
+ numResources++;
599
+ }
600
+ }
596
601
recordJsonMetric(ImageDetailKey.IMAGE_HEAP_RESOURCE_COUNT, numResources);
597
602
l().a(format, ByteFormattingUtil.bytesToHuman(imageHeapSize), Utils.toPercentage(imageHeapSize, imageFileSize))
598
- .doclink("image heap", "#glossary-image-heap").a(":%,9d objects and %,d resources ", heapObjectCount, numResources).println();
603
+ .doclink("image heap", "#glossary-image-heap").a(":%,9d objects and %,d resource%s ", heapObjectCount, numResources, numResources == 1 ? "" : "s" ).println();
599
604
long otherBytes = imageFileSize - codeAreaSize - imageHeapSize;
600
605
if (debugInfoSize > 0) {
601
606
recordJsonMetric(ImageDetailKey.DEBUG_INFO_SIZE, debugInfoSize); // Optional metric
0 commit comments