Skip to content

Add JFR events and track peak usage for native memory tracking (NMT)  #8452

@roberttoyonaga

Description

@roberttoyonaga

Feature request

Please include the following information:

Is your feature request related to a problem? Please describe.
NMT data is currently only exposed by printing to terminal at the end of program execution. This is not only inconvenient, but only provides a snapshot of native memory usage at program exit (there's no info during the lifetime of the program). There should be a better way to access NMT data.

It would also be nice (and cheap) to track peak usages for each category.

Describe the solution you'd like.
Expose NMT data through JFR periodic events similar to OpenJDK.

Describe who do you think will benefit the most.
Native image users and developers will benefit.

Describe alternatives you've considered.
Periodically printing to terminal or to a file is also an option, but it is not as convenient as getting JFR events.

Express whether you'd like to help contributing this feature
I can help with this.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions