RFR: 8338389: [JFR] Long strings should be added to the string pool [v3]

Joakim Nordström jnordstrom at openjdk.org
Fri Aug 23 08:58:03 UTC 2024


On Fri, 23 Aug 2024 07:25:43 GMT, Joakim Nordström <jnordstrom at openjdk.org> wrote:

>> When committing JFR events with string data longer than 128 characters, the string isn't added to the JFR string pool. In scenarios with many events containing large string values, this can lead to very large JFR recordings. This is mostly the case for custom events containing f.i. SQL strings or other data. In the case where the string data consist of mostly duplicate data, adding them to the string pool has been shown to reduce the recording size by a factor of 10.
>> 
>> This change will add all longer strings (>128 characters) to the string pool. Strings of length 16-128 are still added using the same pre-cache methodology as before. The raised StringPool.MAX_LIMIT is used by [`jdk.jfr.internal.event.EventWriter::putString`](https://github.com/openjdk/jdk/blob/master/src/jdk.jfr/share/classes/jdk/jfr/internal/event/EventWriter.java) to determine which strings to add to the pool.
>> 
>> ## Testing
>> - tier1-tier3
>> - jdk_jfr
>> - Internal testing with high load, using custom JFR events containing long strings have been performed
>
> Joakim Nordström has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed test

I've fixed the nits for the test, thanks @turbanoff and @mgronlun!

This now needs a re-review. Thanks!

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

PR Comment: https://git.openjdk.org/jdk/pull/20596#issuecomment-2306624089


More information about the hotspot-jfr-dev mailing list