JDK-8185572 : Enable AssumeMP by default on SPARC machines
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7u151,8u144,9,10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-07-31
  • Updated: 2018-02-15
  • Resolved: 2017-08-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 7 JDK 8
10 b21Fixed 7u171Fixed 8u144Fixed
Related Reports
Relates :  
Description
Valdimir Kozlov's evaluation:

I looked on hs_err files for 8-60 and 8-111 (I don't have permission to look
on 8-131). They have next line about CPU:

CPU:total 1 v9, popc, vis1, vis2, vis3, blk_init, cbcond, aes, sha1, sha256,
sha512, sun4v, niagara_plus

A strange thing is it lists only 1 thread: "total 1 v9". Looks like it was
running in some kind of VM.

is_MP() will return false in such case!!!

To finalize set of BIS instructions we have to issue membar at the end:

http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/d3cc20285653/src/cpu/sparc/vm/stubGenerator_sparc.cpp#l1106

But membar instruction is not generated if MP is false:

http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/d3cc20285653/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp#l651

I think this is the cause of the problem.

To verify that run with -XX:+AssumeMP

http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/d3cc20285653/src/share/vm/runtime/os.hpp#l217

We should set AssumeMP to true on SPARC.

Comments
It is more code change to add new membar.This bug aboiut previous release fix. [~poonam] Poonam, please, set correct Affected and Fix version for this bug. There is RFE JDK-8150715 where we may consider to use unconditional membar.
09-08-2017

Re: "To finalize set of BIS instructions we have to issue membar at the end" If this instruction sequence truly needs an unconditional membar regardless of actual MP configuration, then perhaps a way is needed to force an unconditional membar?
08-08-2017

JDK-8185062 is general solution for this problem in a future release.
08-08-2017

[~poonam] Poonam, did you get answer on David question? Was it really container/VM with one CPU? On other hand is_MP() is using _processor_count value set by sysconf(_SC_NPROCESSORS_CONF) and not active_processor_count(): http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/aa4ffb1f30c9/src/os/solaris/vm/os_solaris.cpp#l353 So I don't think it is error in Hotspot.
08-08-2017

We need to check whether the system truly only had one cpu, or more likely there is an error in obtaining the processor information and we default to using 1. (In which case it might be safer to default to using a value > 1.)
01-08-2017