-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GR-39497] Add support for JSON build output to GraalVM Native Image. #4685
Conversation
@@ -447,12 +447,11 @@ public void printCreationEnd(int imageSize, int numHeapObjects, long imageHeapSi | |||
.doclink("code area", "#glossary-code-area").a(":%,10d compilation units", numCompilations).println(); | |||
EconomicMap<Pair<String, String>, ResourceStorageEntry> resources = Resources.singleton().resources(); | |||
int numResources = resources.size(); | |||
recordJsonMetrics(ImageDetailKey.IMAGE_HEAP_RESOURCE_COUNT, numResources); | |||
recordJsonResourceMetrics(resources); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fniephaus by removing recordJsonResourceMetrics
you no longer generate the image_details -> image_heap -> resources -> bytes
value in the JSON output and the produced JSON would therefore no longer be a according to schema here:
https://github.com/oracle/graal/blob/fniephaus/GR-39497/json-build-output/docs/reference-manual/native-image/assets/build-output-schema-v1.json#L259..L262
So either, drop it from the schema too or keep the method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might have missed https://github.com/oracle/graal/pull/4685/files#diff-54ef73a23b10bd907d5869cc88b651fae7fef0467ccfaf8f50472cdd1e114eceR531 and 5e652cd :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely. Thanks! That wasn't in my version of the checkout when I last looked. Particularly 5e652cd
This uses a simple backing Map (HashMap), for collecting the data. It's entirely driven by ProgressReporter and if not requested by the user, by specifying: `-H:BuildOutputJSONFile=<file>` on the command line, entirely disabled. It also adds a JSON schema to the native image manual as an asset.
and rename `recordJsonMetrics` to `recordJsonMetric`.
d64ad84
to
439a0fe
Compare
ada1b8c
to
67c2f2c
Compare
67c2f2c
to
13dbf2a
Compare
No description provided.