RFR: 8330677: Add Per-Compilation memory usage to JFR [v2]

Matthias Baesken mbaesken at openjdk.org
Fri Apr 26 13:33:26 UTC 2024


On Fri, 26 Apr 2024 12:40:00 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> We have the (opt-in, disabled by default) compiler memory statistics introduced with [JDK-8317683](https://bugs.openjdk.org/browse/JDK-8317683).
>> 
>> Since temporary memory usage by compilers can significantly affect process footprint, it would make sense to expose at least the total peak usage per compilation via JFR.
>> 
>> --- 
>> 
>> This patch adds "Arena Usage" to CompilationEvent. We now see in JMC how costly a compilation had been. (The cost can get very high, as we have seen just recently again with [JDK-8327247](https://bugs.openjdk.org/browse/JDK-8327247) ).
>> 
>> ![jmc-memstat](https://github.com/openjdk/jdk/assets/6041414/8cac366a-2a8f-45ca-be40-d419712f81a7)
>
> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
> 
>  - Adapt test
>  - merge
>  - JDK-8330677-Add-Per-Compilation-memory-usage-to-JFR

Regarding src/hotspot/share/jfr/metadata/metadata.xml , could you label it 'Arena Peak Usage' or something like this ? I would like to have it more clear that it is the peak usage.
Did you check my nullptr check related question ?
Otherwise looks okay to me.
It is a bit unfortunate that by default , we have now an 'empty' added field in the JFR Compilation event. But it is what it is; any chances that the compiler mem statistics would be enabled by default in the future, or is this considered to costly ?

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

PR Comment: https://git.openjdk.org/jdk/pull/18864#issuecomment-2079356638


More information about the hotspot-compiler-dev mailing list