Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/vm_version.cpp @ 24227:b5a90e4a6c26 jvmci-0.34
make internal_vm_info_string() consistent with java.vm.version
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 25 Aug 2017 14:25:06 +0200 |
parents | abc19eb35547 |
children |
comparison
equal
deleted
inserted
replaced
24226:abc19eb35547 | 24227:b5a90e4a6c26 |
---|---|
44 | 44 |
45 const char* Abstract_VM_Version::_s_vm_release = NULL; | 45 const char* Abstract_VM_Version::_s_vm_release = NULL; |
46 const char* Abstract_VM_Version::_s_vm_name = NULL; | 46 const char* Abstract_VM_Version::_s_vm_name = NULL; |
47 int Abstract_VM_Version::_vm_properties_initialized_from_file = | 47 int Abstract_VM_Version::_vm_properties_initialized_from_file = |
48 Abstract_VM_Version::init_vm_properties(Abstract_VM_Version::_s_vm_name, Abstract_VM_Version::_s_vm_release); | 48 Abstract_VM_Version::init_vm_properties(Abstract_VM_Version::_s_vm_name, Abstract_VM_Version::_s_vm_release); |
49 const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string(); | 49 const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::init_internal_vm_info_string(); |
50 bool Abstract_VM_Version::_supports_cx8 = false; | 50 bool Abstract_VM_Version::_supports_cx8 = false; |
51 bool Abstract_VM_Version::_supports_atomic_getset4 = false; | 51 bool Abstract_VM_Version::_supports_atomic_getset4 = false; |
52 bool Abstract_VM_Version::_supports_atomic_getset8 = false; | 52 bool Abstract_VM_Version::_supports_atomic_getset8 = false; |
53 bool Abstract_VM_Version::_supports_atomic_getadd4 = false; | 53 bool Abstract_VM_Version::_supports_atomic_getadd4 = false; |
54 bool Abstract_VM_Version::_supports_atomic_getadd8 = false; | 54 bool Abstract_VM_Version::_supports_atomic_getadd8 = false; |
295 | 295 |
296 const char *Abstract_VM_Version::vm_platform_string() { | 296 const char *Abstract_VM_Version::vm_platform_string() { |
297 return OS "-" CPU; | 297 return OS "-" CPU; |
298 } | 298 } |
299 | 299 |
300 const char* Abstract_VM_Version::internal_vm_info_string() { | 300 const char* Abstract_VM_Version::init_internal_vm_info_string() { |
301 #ifndef HOTSPOT_BUILD_USER | 301 #ifndef HOTSPOT_BUILD_USER |
302 #define HOTSPOT_BUILD_USER unknown | 302 #define HOTSPOT_BUILD_USER unknown |
303 #endif | 303 #endif |
304 | 304 |
305 #ifndef HOTSPOT_BUILD_COMPILER | 305 #ifndef HOTSPOT_BUILD_COMPILER |
357 #endif | 357 #endif |
358 #else | 358 #else |
359 #define FLOAT_ARCH_STR XSTR(FLOAT_ARCH) | 359 #define FLOAT_ARCH_STR XSTR(FLOAT_ARCH) |
360 #endif | 360 #endif |
361 | 361 |
362 return VMNAME " (" VM_RELEASE ") for " OS "-" CPU FLOAT_ARCH_STR | 362 |
363 " JRE (" JRE_RELEASE_VERSION "), built on " __DATE__ " " __TIME__ | 363 #define VM_INTERNAL_INFO_FORMAT(name, release) \ |
364 " by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER; | 364 name " (" release ") for " OS "-" CPU FLOAT_ARCH_STR \ |
365 " JRE (" JRE_RELEASE_VERSION "), built on " __DATE__ " " __TIME__ \ | |
366 " by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER | |
367 | |
368 if (_s_vm_name != VMNAME || _s_vm_release != VM_RELEASE) { | |
369 int len = strlen(VM_INTERNAL_INFO_FORMAT(VMNAME, VM_RELEASE)) - strlen(VMNAME VM_RELEASE) + | |
370 strlen(_s_vm_name) + strlen(_s_vm_release); | |
371 char* buffer = NEW_C_HEAP_ARRAY(char, len + 1, mtInternal); | |
372 sprintf(buffer, VM_INTERNAL_INFO_FORMAT("%s", "%s"), _s_vm_name, _s_vm_release); | |
373 return buffer; | |
374 } | |
375 return VM_INTERNAL_INFO_FORMAT(VMNAME, VM_RELEASE); | |
376 #undef VM_INTERNAL_INFO_FORMAT | |
377 } | |
378 | |
379 const char* Abstract_VM_Version::internal_vm_info_string() { | |
380 return _s_internal_vm_info_string; | |
365 } | 381 } |
366 | 382 |
367 const char *Abstract_VM_Version::vm_build_user() { | 383 const char *Abstract_VM_Version::vm_build_user() { |
368 return HOTSPOT_BUILD_USER; | 384 return HOTSPOT_BUILD_USER; |
369 } | 385 } |