RFR: 8037914: Add JFR event for string deduplication

Erik Gahlin egahlin at openjdk.org
Wed Oct 29 13:00:34 UTC 2025


On Tue, 28 Oct 2025 23:54:20 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:

> It depends on the allocation pattern, but in principle string deduplication is triggered at the end of a young GC. So the number of events per second should be roughly the same order of magnitude.
> 
> There's a ticket about repeated consecutive deduplication rounds which are not related to a completed GC cycle: [JDK-8315238](https://bugs.openjdk.org/browse/JDK-8315238) I guess the events in this PR may suffer from the same potential behavior, but the numbers do not seem particularly concerning to me.

I think one event is sufficient. It’s easier to configure, easier to program against and will have less overhead.

We want events to be enabled by default, and they must work even in pathological cases, such as an application calling String::intern() in a loop. If you believe we can get 10 000 events per minute in such cases, it might be better to fix JDK-8315238 first, or disable the event and enable it only in profile.jfc, then re-enable it in default.jfc once JDK-8315238 has been fixed.

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

PR Comment: https://git.openjdk.org/jdk/pull/28015#issuecomment-3461389248


More information about the hotspot-dev mailing list