RFR: 8365611: Use lookup table for JfrEventThrottler

Thomas Stuefe stuefe at openjdk.org
Tue Aug 26 22:03:48 UTC 2025


On Mon, 18 Aug 2025 10:15:50 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> This patch prepares the way to throttle any JFR event, not only the three events for which we hard-code throttlers. It also cleans up the throttler code and replaces the switch construct with a lookup table.
>> 
>> The patch does not yet enable throttling for any other event, since that may be a contentious move, and I would like for this patch to go in without too much fuss. So I did not make any new events "throttleble".
>> 
>> If it turns out to be non-contentious, I am fine with just enabling throttling capability for all events.
>
> I'm just trying to understand what is "underneath" this change. Throttling all events is not a target since it does not make sense.
> 
> Making it easier to plug in a new throttler for a new JVM event would make more sense.

Thanks @mgronlun @egahlin and @roberttoyonaga !

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

PR Comment: https://git.openjdk.org/jdk/pull/26801#issuecomment-3222794482


More information about the hotspot-jfr-dev mailing list