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

Joakim Nordström jnordstrom at openjdk.org
Tue Aug 27 13:20:10 UTC 2024


On Thu, 15 Aug 2024 13:16:24 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

This pull request has now been integrated.

Changeset: d5c6158c
Author:    Joakim Nordström <jnordstrom at openjdk.org>
Committer: Markus Grönlund <mgronlun at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d5c6158cedfd96a9f97d83355b10730b81274648
Stats:     119 lines in 2 files changed: 116 ins; 0 del; 3 mod

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

Reviewed-by: mgronlun

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

PR: https://git.openjdk.org/jdk/pull/20596


More information about the hotspot-jfr-dev mailing list