(XS) RFR: 8056183: os::is_MP() always reports true when NMT is enabled
Coleen Phillimore
coleen.phillimore at oracle.com
Tue Sep 9 11:58:56 UTC 2014
Looks good. Good comment.
Coleen
On 9/9/14, 1:50 AM, David Holmes wrote:
> webrev:
>
> http://cr.openjdk.java.net/~dholmes/8056183/webrev/
>
> This is a confidential bug so here is the background:
>
> The NMT code uses atomics very early in the initialization process,
> before _processor_count has been initialized, and so it would hit the
> assertion in is_MP that _processor_count > 0. To workaround that it
> was assumed that if NMT were present then we could just assume a MP
> system and have is_MP return true. That change was made under 8046598.
>
> However that is an invalid assumption on some platforms and will lead
> to incorrect code generation. The real fix for the original assertion
> failure is to just remove the assertion as weakening it to check >= 0
> would serve no point. Further we already assert that _processor_count
> is > 0 when we actually initialize it. Having is_MP return false
> during the early stages of initialization is okay because the VM is
> single-threaded at that point. However, we must be vigilant to ensure
> that we don't make any long term decisions (such as code generation
> choices) based on is_MP during this pre-initialization phase.
>
> So this change reverts the change from 8046598 and removes the assertion.
>
> Testing: JPRT
>
> Pushing to hs-rt/hotspot
>
> Thanks,
> David
More information about the hotspot-runtime-dev
mailing list