RFR: 8310994: Add JFR event for selection operations [v2]

Tim Prinzing tprinzing at openjdk.org
Wed Dec 13 18:42:41 UTC 2023


On Fri, 8 Dec 2023 06:30:21 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/event/SelectionEvent.java line 38:
>> 
>>> 36: public class SelectionEvent extends Event {
>>> 37: 
>>> 38:     public int count;
>> 
>> It could also be interesting to provide the `timeout` that was given to the selection operation.
>
>> It could also be interesting to provide the `timeout` that was given to the selection operation.
> 
> I've tried to work through issues, esp. around selector spinning, and being able to distinguish select from selectNow is important for all of them, so yes, the timeout is needed or else no emit when the timeout == 0 as that's the case you have to filter out when troubleshooting.

I've added filtering of selectNow(), and an event is emitted if there is a timeout independent of the threshold.  The duration should roughly equal the timout in that case.  I added more test cases to cover those two changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16710#discussion_r1425744977


More information about the hotspot-jfr-dev mailing list