src/share/vm/runtime/vm_version.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot-npg Sdiff src/share/vm/runtime

src/share/vm/runtime/vm_version.cpp

Print this page


   1 /*
   2  * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  89   vm_minor_ver += 1;
  90   char* vm_build_num = strchr(vm_minor_ver, '-');
  91   assert(vm_build_num != NULL && vm_build_num[1] == 'b' && isdigit(vm_build_num[2]),"wrong vm build number");
  92   vm_build_num[0] = '\0'; // terminate vm_minor_ver
  93   vm_build_num += 2;
  94 
  95   _vm_major_version = atoi(vm_major_ver);
  96   _vm_minor_version = atoi(vm_minor_ver);
  97   _vm_build_number  = atoi(vm_build_num);
  98 
  99   os::free(vm_version);
 100   _initialized = true;
 101 }
 102 
 103 #if defined(_LP64)
 104   #define VMLP "64-Bit "
 105 #else
 106   #define VMLP ""
 107 #endif
 108 
 109 #ifdef KERNEL

 110   #define VMTYPE "Kernel"
 111 #else // KERNEL
 112 #ifdef TIERED
 113   #define VMTYPE "Server"
 114 #else // TIERED
 115 #ifdef ZERO
 116 #ifdef SHARK
 117   #define VMTYPE "Shark"
 118 #else // SHARK
 119   #define VMTYPE "Zero"
 120 #endif // SHARK
 121 #else // ZERO
 122    #define VMTYPE COMPILER1_PRESENT("Client")   \
 123                   COMPILER2_PRESENT("Server")
 124 #endif // ZERO
 125 #endif // TIERED
 126 #endif // KERNEL

 127 
 128 #ifndef HOTSPOT_VM_DISTRO
 129   #error HOTSPOT_VM_DISTRO must be defined
 130 #endif
 131 #define VMNAME HOTSPOT_VM_DISTRO " " VMLP EMBEDDED_ONLY("Embedded ") VMTYPE " VM"
 132 
 133 const char* Abstract_VM_Version::vm_name() {
 134   return VMNAME;
 135 }
 136 
 137 
 138 const char* Abstract_VM_Version::vm_vendor() {
 139 #ifdef VENDOR
 140   return XSTR(VENDOR);
 141 #else
 142   return JDK_Version::is_gte_jdk17x_version() ?
 143     "Oracle Corporation" : "Sun Microsystems Inc.";
 144 #endif
 145 }
 146 


   1 /*
   2  * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  89   vm_minor_ver += 1;
  90   char* vm_build_num = strchr(vm_minor_ver, '-');
  91   assert(vm_build_num != NULL && vm_build_num[1] == 'b' && isdigit(vm_build_num[2]),"wrong vm build number");
  92   vm_build_num[0] = '\0'; // terminate vm_minor_ver
  93   vm_build_num += 2;
  94 
  95   _vm_major_version = atoi(vm_major_ver);
  96   _vm_minor_version = atoi(vm_minor_ver);
  97   _vm_build_number  = atoi(vm_build_num);
  98 
  99   os::free(vm_version);
 100   _initialized = true;
 101 }
 102 
 103 #if defined(_LP64)
 104   #define VMLP "64-Bit "
 105 #else
 106   #define VMLP ""
 107 #endif
 108 
 109 #ifndef VMTYPE
 110   #ifdef KERNEL
 111     #define VMTYPE "Kernel"
 112   #else // KERNEL
 113   #ifdef TIERED
 114     #define VMTYPE "Server"
 115   #else // TIERED
 116   #ifdef ZERO
 117   #ifdef SHARK
 118     #define VMTYPE "Shark"
 119   #else // SHARK
 120     #define VMTYPE "Zero"
 121   #endif // SHARK
 122   #else // ZERO
 123      #define VMTYPE COMPILER1_PRESENT("Client")   \
 124                     COMPILER2_PRESENT("Server")
 125   #endif // ZERO
 126   #endif // TIERED
 127   #endif // KERNEL
 128 #endif
 129 
 130 #ifndef HOTSPOT_VM_DISTRO
 131   #error HOTSPOT_VM_DISTRO must be defined
 132 #endif
 133 #define VMNAME HOTSPOT_VM_DISTRO " " VMLP EMBEDDED_ONLY("Embedded ") VMTYPE " VM"
 134 
 135 const char* Abstract_VM_Version::vm_name() {
 136   return VMNAME;
 137 }
 138 
 139 
 140 const char* Abstract_VM_Version::vm_vendor() {
 141 #ifdef VENDOR
 142   return XSTR(VENDOR);
 143 #else
 144   return JDK_Version::is_gte_jdk17x_version() ?
 145     "Oracle Corporation" : "Sun Microsystems Inc.";
 146 #endif
 147 }
 148 


src/share/vm/runtime/vm_version.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File