RFR: 8338858: Replace undocumented APIs with documented APIs in the OpenJDK

Alan Bateman alanb at openjdk.org
Mon Sep 9 09:27:05 UTC 2024


On Thu, 22 Aug 2024 18:18:57 GMT, Dhamoder Nalla <dhanalla at openjdk.org> wrote:

> The `wepoll` code has been ported from opensource repo [`wepoll`](https://github.com/piscisaureus/wepoll) to OpenJDK in PR [pull/3816](https://github.com/openjdk/jdk/pull/3816), which incorporated undocumented Windows APIs (NtCreateKeyedEvent, NtReleaseKeyedEvent, NtWaitForKeyedEvent). 
> 
> This PR aims to replace these undocumented APIs with documented synchronization APIs. 
> 
> Test Performed:
> 1. All 12 tests in wepoll repo passed 
>            test-auto-drop-on-close PASS
>            test-connect-fail-events PASS
>            test-connect-success-events PASS
>            test-ctl-fuzz PASS
>            test-error PASS
>            test-leak-1 PASS
>            test-mixed-socket-types PASS
>            test-multi-poll PASS
>            test-oneshot-and-hangup PASS
>            test-reflock PASS
>            test-tree PASS
>            test-udp-pings PASS
>         DONE - 12 PASSED, 0 FAILED
> 
> 2. No new failure in JTreg test
> 3. Micro bench results: similar performance score before and after the changes
> 
> without change in this PR:
> 
> ![image](https://github.com/user-attachments/assets/c784d00e-3f0a-483d-b60a-c7a46aba885c)
> 
> With the change in this PR:
> 
> ![image](https://github.com/user-attachments/assets/5e6a68bc-48ae-475f-891e-395941068f6e)

Can you confirm that you've run jdk tier2 with these changes?

@djelinski Would you have cycles to look at this? Ideally the changes would go upstream and/or Microsoft would contribute resources to that project. From a quick scan, the changes aren't too bad although there are some needless fixes to comment typos.

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

PR Comment: https://git.openjdk.org/jdk/pull/20682#issuecomment-2337589854
PR Comment: https://git.openjdk.org/jdk/pull/20682#issuecomment-2337595430


More information about the nio-dev mailing list