On Wed, 13 Dec 2023 22:20: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 > > Tim Prinzing has updated the pull request incrementally with one additional > commit since the last revision: > > add select timeout field to the event src/java.base/share/classes/sun/nio/ch/SelectorImpl.java line 143: > 141: throws IOException > 142: { > 143: // filter selectNow ops from consideration (timeout == 0) I think simplify this comment to say no JFR event for selectNow. src/java.base/share/classes/sun/nio/ch/SelectorImpl.java line 153: > 151: if ((n == 0) || (SelectorSelectEvent.shouldCommit(duration))) { > 152: timeout = (timeout < 0) ? 0 : timeout; > 153: SelectorSelectEvent.commit(start, duration, n, timeout); The comment is a bit confusing here. n == 0 means that no selected keys were added or consumed before timeout or wakeup. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16710#discussion_r1440332584 PR Review Comment: https://git.openjdk.org/jdk/pull/16710#discussion_r1440332569