Skip to content

Commit

Permalink
Add optional runtime_compiled_methods info.
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Jun 30, 2022
1 parent 439a0fe commit 13dbf2a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,27 @@
"title": "The number of bytes used for debug info"
}
}
},
"runtime_compiled_methods": {
"type": "object",
"default": {},
"title": "Statistics on runtime compiled methods (optional)",
"required": [
"count",
"graph_encoding_bytes"
],
"properties": {
"count": {
"type": "integer",
"default": 0,
"title": "Number of runtime compiled methods"
},
"graph_encoding_bytes": {
"type": "integer",
"default": 0,
"title": "The number of bytes used for graph encodings bytes"
}
}
}
},
"examples": [
Expand Down Expand Up @@ -494,6 +515,10 @@
"count": 134,
"bytes": 10200
}
},
"runtime_compiled_methods": {
"count": 12744,
"graph_encoding_bytes": 1440000
}
},
"resource_usage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ private void printAnalysisStatistics(AnalysisUniverse universe, Collection<Strin
l().a(actualVsTotalFormat, reachableMethods, reachableMethods / (double) totalMethods * 100, totalMethods)
.a(" methods ").doclink("reachable", "#glossary-reachability").println();
if (numRuntimeCompiledMethods >= 0) {
recordJsonMetric(ImageDetailKey.RUNTIME_COMPILED_METHODS_COUNT, numRuntimeCompiledMethods);
l().a(actualVsTotalFormat, numRuntimeCompiledMethods, numRuntimeCompiledMethods / (double) totalMethods * 100, totalMethods)
.a(" methods included for ").doclink("runtime compilation", "#glossary-runtime-methods").println();
}
Expand Down Expand Up @@ -533,7 +534,8 @@ private void calculateHeapBreakdown(Collection<ObjectInfo> heapObjects) {
heapBreakdown.put(BREAKDOWN_BYTE_ARRAY_PREFIX + linkStrategy.asDocLink("embedded resources", "#glossary-embedded-resources"), resourcesByteLength);
remainingBytes -= resourcesByteLength;
}
if (graphEncodingByteLength > 0) {
if (graphEncodingByteLength >= 0) {
recordJsonMetric(ImageDetailKey.GRAPH_ENCODING_SIZE, graphEncodingByteLength);
heapBreakdown.put(BREAKDOWN_BYTE_ARRAY_PREFIX + linkStrategy.asDocLink("graph encodings", "#glossary-graph-encodings"), graphEncodingByteLength);
remainingBytes -= graphEncodingByteLength;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ enum ImageDetailKey implements JsonMetric {
IMAGE_HEAP_SIZE("image_heap", null, "bytes"),
DEBUG_INFO_SIZE("debug_info", null, "bytes"),
IMAGE_HEAP_RESOURCE_COUNT("image_heap", "resources", "count"),
RESOURCE_SIZE_BYTES("image_heap", "resources", "bytes");
RESOURCE_SIZE_BYTES("image_heap", "resources", "bytes"),
RUNTIME_COMPILED_METHODS_COUNT("runtime_compiled_methods", null, "count"),
GRAPH_ENCODING_SIZE("runtime_compiled_methods", null, "graph_encoding_bytes");

private String bucket;
private String key;
Expand Down

0 comments on commit 13dbf2a

Please sign in to comment.