hotspot/src/cpu/x86/vm/vm_version_x86.hpp
changeset 27881 031beca6c682
parent 26434 09ad55e5f486
child 30624 2e1803c8a26d
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Mon Dec 01 12:16:15 2014 -0500
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Mon Dec 01 18:22:45 2014 +0400
@@ -570,10 +570,12 @@
   static uint cores_per_cpu()  {
     uint result = 1;
     if (is_intel()) {
-      if (supports_processor_topology()) {
+      bool supports_topology = supports_processor_topology();
+      if (supports_topology) {
         result = _cpuid_info.tpl_cpuidB1_ebx.bits.logical_cpus /
                  _cpuid_info.tpl_cpuidB0_ebx.bits.logical_cpus;
-      } else {
+      }
+      if (!supports_topology || result == 0) {
         result = (_cpuid_info.dcp_cpuid4_eax.bits.cores_per_cpu + 1);
       }
     } else if (is_amd()) {