RFR (S): 8228857: Refactor PlatformMonitor into PlatformMutex and PlatformMonitor
David Holmes
david.holmes at oracle.com
Sun Aug 11 22:31:11 UTC 2019
Hi Dan,
On 11/08/2019 10:57 pm, Daniel D. Daugherty wrote:
> On 8/9/19 2:25 AM, David Holmes wrote:
>> Okay here is v2 with Kim's non-copyable adjustments and an alternate
>> approach to the "impl" class so that the PlatformMutex doesn't have to
>> pay for the unused pthread_cond_t. Trade-off in this scheme is that
>> PlatformMonitor now has two "impl" pointers so consumes more space.
>>
>> Also made comment changes suggested by Dan.
>>
>> http://cr.openjdk.java.net/~dholmes/8228857/webrev.v2/
>
> src/hotspot/os/posix/os_posix.cpp
> No comments.
>
> src/hotspot/os/posix/os_posix.hpp
> L237: // former pthread_cond_t, by using a freelist of
> mutex/condvar pairs.
> You aren't allocating pairs anymore right?
Fixed:
// former pthread_cond_t, by using freelists of mutexes and condvars.
> L239: #ifdef __APPLE__
> L240: #define PLATFORM_MONITOR_IMPL_INDIRECT 1
> L241: #else
> L242: #define PLATFORM_MONITOR_IMPL_INDIRECT 1
> L243: #endif
> Leftover from compile testing on a non Apple platform?
> Update: Same comment as Dean.
Fixed.
> L268: PlatformMutex(); // Use freelist allocation of
> impl.
> nit - comment was previously aligned with L271.
Fixed.
> src/hotspot/os/posix/os_posix.inline.hpp
> No comments.
>
> src/hotspot/os/solaris/os_solaris.cpp
> No comments.
>
> src/hotspot/os/solaris/os_solaris.hpp
> No comments.
>
> src/hotspot/os/windows/os_windows.hpp
> No comments.
>
> src/hotspot/os/windows/os_windows.inline.hpp
> No comments.
>
> Thumbs up.
Thanks Dan. Webrev updated in place.
David
> Dan
>
>
>>
>> Thanks,
>> David
>> -----
>
More information about the hotspot-dev
mailing list