1 /*
2 * Copyright (c) 1998, 2013, 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 *
163 // NOTE: do *not* use stringStream. this function is called by
164 // fatal error handler. if the crash is in native thread,
165 // stringStream cannot get resource allocated and will SEGV.
166 const char* Abstract_VM_Version::vm_release() {
167 return VM_RELEASE;
168 }
169
170 // NOTE: do *not* use stringStream. this function is called by
171 // fatal error handlers. if the crash is in native thread,
172 // stringStream cannot get resource allocated and will SEGV.
173 const char* Abstract_VM_Version::jre_release_version() {
174 return JRE_RELEASE_VERSION;
175 }
176
177 #define OS LINUX_ONLY("linux") \
178 WINDOWS_ONLY("windows") \
179 SOLARIS_ONLY("solaris") \
180 AIX_ONLY("aix") \
181 BSD_ONLY("bsd")
182
183 #ifdef ZERO
184 #define CPU ZERO_LIBARCH
185 #else
186 #define CPU IA32_ONLY("x86") \
187 IA64_ONLY("ia64") \
188 AMD64_ONLY("amd64") \
189 ARM_ONLY("arm") \
190 PPC32_ONLY("ppc") \
191 PPC64_ONLY("ppc64") \
192 SPARC_ONLY("sparc")
193 #endif // ZERO
194
195 const char *Abstract_VM_Version::vm_platform_string() {
196 return OS "-" CPU;
197 }
198
199 const char* Abstract_VM_Version::internal_vm_info_string() {
200 #ifndef HOTSPOT_BUILD_USER
201 #define HOTSPOT_BUILD_USER unknown
202 #endif
203
204 #ifndef HOTSPOT_BUILD_COMPILER
205 #ifdef _MSC_VER
206 #if _MSC_VER == 1100
207 #define HOTSPOT_BUILD_COMPILER "MS VC++ 5.0"
208 #elif _MSC_VER == 1200
209 #define HOTSPOT_BUILD_COMPILER "MS VC++ 6.0"
210 #elif _MSC_VER == 1310
211 #define HOTSPOT_BUILD_COMPILER "MS VC++ 7.1 (VS2003)"
212 #elif _MSC_VER == 1400
213 #define HOTSPOT_BUILD_COMPILER "MS VC++ 8.0 (VS2005)"
234 #elif __SUNPRO_CC == 0x5100
235 #define HOTSPOT_BUILD_COMPILER "Sun Studio 12u1"
236 #elif __SUNPRO_CC == 0x5120
237 #define HOTSPOT_BUILD_COMPILER "Sun Studio 12u3"
238 #else
239 #define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC)
240 #endif
241 #elif defined(__GNUC__)
242 #define HOTSPOT_BUILD_COMPILER "gcc " __VERSION__
243 #elif defined(__IBMCPP__)
244 #define HOTSPOT_BUILD_COMPILER "xlC " XSTR(__IBMCPP__)
245
246 #else
247 #define HOTSPOT_BUILD_COMPILER "unknown compiler"
248 #endif
249 #endif
250
251 #ifndef FLOAT_ARCH
252 #if defined(__SOFTFP__)
253 #define FLOAT_ARCH_STR "-sflt"
254 #elif defined(E500V2)
255 #define FLOAT_ARCH_STR "-e500v2"
256 #elif defined(ARM)
257 #define FLOAT_ARCH_STR "-vfp"
258 #elif defined(PPC32)
259 #define FLOAT_ARCH_STR "-hflt"
260 #else
261 #define FLOAT_ARCH_STR ""
262 #endif
263 #else
264 #define FLOAT_ARCH_STR XSTR(FLOAT_ARCH)
265 #endif
266
267 return VMNAME " (" VM_RELEASE ") for " OS "-" CPU FLOAT_ARCH_STR
268 " JRE (" JRE_RELEASE_VERSION "), built on " __DATE__ " " __TIME__
269 " by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER;
270 }
271
272 const char *Abstract_VM_Version::vm_build_user() {
273 return HOTSPOT_BUILD_USER;
274 }
275
276 unsigned int Abstract_VM_Version::jvm_version() {
277 return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
278 ((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
279 (Abstract_VM_Version::vm_build_number() & 0xFF);
|
1 /*
2 * Copyright (c) 1998, 2015, 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 *
163 // NOTE: do *not* use stringStream. this function is called by
164 // fatal error handler. if the crash is in native thread,
165 // stringStream cannot get resource allocated and will SEGV.
166 const char* Abstract_VM_Version::vm_release() {
167 return VM_RELEASE;
168 }
169
170 // NOTE: do *not* use stringStream. this function is called by
171 // fatal error handlers. if the crash is in native thread,
172 // stringStream cannot get resource allocated and will SEGV.
173 const char* Abstract_VM_Version::jre_release_version() {
174 return JRE_RELEASE_VERSION;
175 }
176
177 #define OS LINUX_ONLY("linux") \
178 WINDOWS_ONLY("windows") \
179 SOLARIS_ONLY("solaris") \
180 AIX_ONLY("aix") \
181 BSD_ONLY("bsd")
182
183 #ifndef CPU
184 #ifdef ZERO
185 #define CPU ZERO_LIBARCH
186 #else
187 #define CPU IA32_ONLY("x86") \
188 IA64_ONLY("ia64") \
189 AMD64_ONLY("amd64") \
190 PPC64_ONLY("ppc64") \
191 SPARC_ONLY("sparc")
192 #endif // ZERO
193 #endif
194
195 const char *Abstract_VM_Version::vm_platform_string() {
196 return OS "-" CPU;
197 }
198
199 const char* Abstract_VM_Version::internal_vm_info_string() {
200 #ifndef HOTSPOT_BUILD_USER
201 #define HOTSPOT_BUILD_USER unknown
202 #endif
203
204 #ifndef HOTSPOT_BUILD_COMPILER
205 #ifdef _MSC_VER
206 #if _MSC_VER == 1100
207 #define HOTSPOT_BUILD_COMPILER "MS VC++ 5.0"
208 #elif _MSC_VER == 1200
209 #define HOTSPOT_BUILD_COMPILER "MS VC++ 6.0"
210 #elif _MSC_VER == 1310
211 #define HOTSPOT_BUILD_COMPILER "MS VC++ 7.1 (VS2003)"
212 #elif _MSC_VER == 1400
213 #define HOTSPOT_BUILD_COMPILER "MS VC++ 8.0 (VS2005)"
234 #elif __SUNPRO_CC == 0x5100
235 #define HOTSPOT_BUILD_COMPILER "Sun Studio 12u1"
236 #elif __SUNPRO_CC == 0x5120
237 #define HOTSPOT_BUILD_COMPILER "Sun Studio 12u3"
238 #else
239 #define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC)
240 #endif
241 #elif defined(__GNUC__)
242 #define HOTSPOT_BUILD_COMPILER "gcc " __VERSION__
243 #elif defined(__IBMCPP__)
244 #define HOTSPOT_BUILD_COMPILER "xlC " XSTR(__IBMCPP__)
245
246 #else
247 #define HOTSPOT_BUILD_COMPILER "unknown compiler"
248 #endif
249 #endif
250
251 #ifndef FLOAT_ARCH
252 #if defined(__SOFTFP__)
253 #define FLOAT_ARCH_STR "-sflt"
254 #else
255 #define FLOAT_ARCH_STR ""
256 #endif
257 #else
258 #define FLOAT_ARCH_STR XSTR(FLOAT_ARCH)
259 #endif
260
261 return VMNAME " (" VM_RELEASE ") for " OS "-" CPU FLOAT_ARCH_STR
262 " JRE (" JRE_RELEASE_VERSION "), built on " __DATE__ " " __TIME__
263 " by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER;
264 }
265
266 const char *Abstract_VM_Version::vm_build_user() {
267 return HOTSPOT_BUILD_USER;
268 }
269
270 unsigned int Abstract_VM_Version::jvm_version() {
271 return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
272 ((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
273 (Abstract_VM_Version::vm_build_number() & 0xFF);
|