RFR: 8248817: Windows: Improving common cross-platform code

Ludovic Henry luhenry at microsoft.com
Thu Jul 9 13:55:15 UTC 2020


Hello,

As part of adding support for Windows-AArch64, I've had the opportunity to read through most of the Windows-x86 code. In doing so, I found some code that I think can be simplified and made easier to read and maintain.

The three areas I have found are:
- Atomics: Hotspot doesn't make use of existing intrinsics provided by MSVC and Win32, even ones available since Windows XP.
- Exception handling: there is some code repetition which, even if functional, is subpar.
- Frames: we can use the existing os::fetch_frame_from_context to simplify the code and reduce frame parsing logic duplication.

I've split the webrevs along the above lines, making each simpler to review. I'm also hosting these webrevs on Bernhard Urban's CR as I currently do not have authorship. I'll also work with him to update the description of the JBS.

JBS: https://bugs.openjdk.java.net/browse/JDK-8248817
Webrevs:
http://cr.openjdk.java.net/~burban/luhenry/8248817-atomics/
http://cr.openjdk.java.net/~burban/luhenry/8248817-exception-handling/
http://cr.openjdk.java.net/~burban/luhenry/8248817-frames/

Tests: jtreg:hotspot:tier, jtreg:jdk:tier1, jtreg:jdk:tier2, jtreg:langtools on Windows-x86 and Windows-x86_64, no regressions.

Thank you,

--
Ludovic


More information about the hotspot-runtime-dev mailing list