@@ -522,7 +522,7 @@ private void printAnalysisStatistics(AnalysisUniverse universe, Collection<Strin
522522 }
523523 }
524524 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 ();
526526 }
527527 int numLibraries = libraries .size ();
528528 if (numLibraries > 0 ) {
@@ -592,10 +592,15 @@ public void printCreationEnd(int imageFileSize, int heapObjectCount, long imageH
592592 String format = "%9s (%5.2f%%) for " ;
593593 l ().a (format , ByteFormattingUtil .bytesToHuman (codeAreaSize ), Utils .toPercentage (codeAreaSize , imageFileSize ))
594594 .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+ }
596601 recordJsonMetric (ImageDetailKey .IMAGE_HEAP_RESOURCE_COUNT , numResources );
597602 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 ();
599604 long otherBytes = imageFileSize - codeAreaSize - imageHeapSize ;
600605 if (debugInfoSize > 0 ) {
601606 recordJsonMetric (ImageDetailKey .DEBUG_INFO_SIZE , debugInfoSize ); // Optional metric
0 commit comments