On Mon, 26 May 2025 19:58:26 GMT, Robert Toyonaga <d...@openjdk.org> wrote:

>> Johannes Bechberger has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Remove mistake
>
> src/hotspot/share/jfr/recorder/service/jfrEventThrottler.cpp line 89:
> 
>> 87:   }
>> 88:   if (event_id == JfrCPUTimeSampleEvent) {
>> 89:     return _disabled_cpu_time_sample_throttler;
> 
> Why do you need to make a "disabled" throttler? Shouldn't the rate limiting 
> always be done by the arguments given to `timer_create`? The actual JFR 
> throttling mechanism used by `ObjectAllocationSample` doesn't really fit this 
> use-case anyway since you can already pre-determine the rate at which events 
> are emitted (while with `ObjectAllocationSample` you can't).

This just makes the code simpler and avoids two additional checks on the 
throttler hot-path. The _disabled_cpu_time_sample_throttler is like `nullptr` 
but without the `nullptr` check.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2107813533

Reply via email to