On Fri, 17 Nov 2023 16:22:55 GMT, Tim Prinzing <tprinz...@openjdk.org> wrote:
> Added mirror event with static methods: jdk.internal.event.SelectionEvent > that provides the duration of select calls and the count of how many keys are > available. > > Emit the event from SelectorImpl::lockAndDoSelect > > Test at jdk.jfr.event.io.TestSelectionEvents src/jdk.jfr/share/conf/jfr/default.jfc line 745: > 743: <setting name="enabled">true</setting> > 744: <setting name="stackTrace">true</setting> > 745: <setting name="threshold">20 ms</setting> The default threshold is 20ms but that means the default won't emit en event when spinning. If this event is used for performance and troubleshooting purposes then maybe we should emit an event when select returns 0 and not emit an event when selectNow returns 0 (selectNow is used to flush channels from the Selector so returning 0 is normal and not interesting). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16710#discussion_r1401979076