RFR: 5705: Explain metaspace in rule results [v2]

Henrik Dafgård hdafgard at openjdk.org
Wed Jun 18 13:25:37 UTC 2025


On Sat, 14 Jun 2025 18:35:46 GMT, Suchita Chaturvedi <schaturvedi at openjdk.org> wrote:

>> This enhancement updates MetaspaceOomRule and IncreasingMetaspaceLiveSetRule with the proper explanation and relevant real time values which were missing.
>
> Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Implemented review comments

core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/memory/MetaspaceOomRule.java line 102:

> 100: 						.addResult(OOM_EVENTS, oomCount).build();
> 101: 			}
> 102: 

This would be cleaner if you only place the `.addResult(MAX_METASPACE_SIZE, maxMetaspaceSize)` line inside the if-block.

core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/resources/org/openjdk/jmc/flightrecorder/rules/jdk/messages/internal/messages.properties line 523:

> 521: ManyRunningProcessesRule_INFO_LIMIT_LONG=The number of simultaneous processes needed to trigger an info notice
> 522: MetaspaceOomRuleFactory_RULE_NAME=Metaspace Out of Memory
> 523: MetaspaceOomRuleFactory_TEXT_CAUSE=Java class metadata is allocated in native memory (metaspace). When the amount of native memory needed for a class metadata exceeds MaxMetaspaceSize, a java.lang.OutOfMemoryError exception with a detail MetaSpace is thrown. The amount of metaspace that can be used for class metadata is limited by the parameter MaxMetaspaceSize, which is specified on the command line.

It should be Metaspace instead of MetaSpace here as well.

-------------

PR Review Comment: https://git.openjdk.org/jmc/pull/654#discussion_r2147123990
PR Review Comment: https://git.openjdk.org/jmc/pull/654#discussion_r2154598362


More information about the jmc-dev mailing list