RFR (S): 8214816: os::read() should not transition to _thread_blocked with safepoint check on Solaris
David Holmes
david.holmes at oracle.com
Thu Jan 10 20:42:43 UTC 2019
On 11/01/2019 4:19 am, Markus Gronlund wrote:
> Hi David,
>
> Looks good, thanks for detailing the historical context related to this.
Thanks for looking at this Markus.
David
-----
> Markus
>
> -----Original Message-----
> From: David Holmes
> Sent: den 10 januari 2019 02:00
> To: hotspot-dev developers <hotspot-dev at openjdk.java.net>
> Subject: RFR (S): 8214816: os::read() should not transition to _thread_blocked with safepoint check on Solaris
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8214816
> webrev: http://cr.openjdk.java.net/~dholmes/8214816/webrev/
>
> Please see the bug report for detailed background. In short summary all platforms now have the same os::read and os::read_at that doesn't do safepoint checks. Most of the changes are code deletions:
>
> - removed unused os::restartable_read() method
> - removed os::read from all os_*.cpp files and added shared inline definition in os.inline.hpp (checked all callsites already have os.inline.hpp included)
> - removed os::read_at from all non-Windows os_*.cpp files and added shared definition in os_posix.cpp (simple wrapper to pread())
> - fixed the return type of os::read and os::read_at to be ssize_t not size_t.
>
> Also fixed os::read error handling in
> src/hotspot/share/compiler/directivesParser.cpp, and filed JDK-8216461 to have a JFR usage of os::read_at fixed.
>
> Also changed src/hotspot/share/runtime/arguments.cpp to use os::read as it no longer needs to avoid the thread-state-transition. Arguably we could go the other way here and remove os::read completely and use the native ::read on all platforms - there are already uses of ::read elsewhere in the code.
>
> Testing: Mach5 tiers 1 - 3
>
> Thanks,
> David
>
More information about the hotspot-dev
mailing list