61 #endif
62
63 // NOTE: Builds within Visual Studio do not define the build target in
64 // HOTSPOT_RELEASE_VERSION, so it must be done here
65 #if defined(VISUAL_STUDIO_BUILD) && !defined(PRODUCT)
66 #ifndef HOTSPOT_BUILD_TARGET
67 #error HOTSPOT_BUILD_TARGET must be defined
68 #endif
69 #define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET
70 #else
71 #define VM_RELEASE HOTSPOT_RELEASE_VERSION
72 #endif
73
74 // HOTSPOT_RELEASE_VERSION follows the JDK release version naming convention
75 // <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
76 int Abstract_VM_Version::_vm_major_version = 0;
77 int Abstract_VM_Version::_vm_minor_version = 0;
78 int Abstract_VM_Version::_vm_micro_version = 0;
79 int Abstract_VM_Version::_vm_build_number = 0;
80 bool Abstract_VM_Version::_initialized = false;
81 int Abstract_VM_Version::_parallel_worker_threads = 0;
82 bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
83
84 #ifdef ASSERT
85 static void assert_digits(const char * s, const char * message) {
86 for (int i = 0; s[i] != '\0'; i++) {
87 assert(isdigit(s[i]), message);
88 }
89 }
90 #endif
91
92 static void set_version_field(int * version_field, const char * version_str,
93 const char * const assert_msg) {
94 if (version_str != NULL && *version_str != '\0') {
95 DEBUG_ONLY(assert_digits(version_str, assert_msg));
96 *version_field = atoi(version_str);
97 }
98 }
99
100 void Abstract_VM_Version::initialize() {
101 if (_initialized) {
|
61 #endif
62
63 // NOTE: Builds within Visual Studio do not define the build target in
64 // HOTSPOT_RELEASE_VERSION, so it must be done here
65 #if defined(VISUAL_STUDIO_BUILD) && !defined(PRODUCT)
66 #ifndef HOTSPOT_BUILD_TARGET
67 #error HOTSPOT_BUILD_TARGET must be defined
68 #endif
69 #define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET
70 #else
71 #define VM_RELEASE HOTSPOT_RELEASE_VERSION
72 #endif
73
74 // HOTSPOT_RELEASE_VERSION follows the JDK release version naming convention
75 // <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
76 int Abstract_VM_Version::_vm_major_version = 0;
77 int Abstract_VM_Version::_vm_minor_version = 0;
78 int Abstract_VM_Version::_vm_micro_version = 0;
79 int Abstract_VM_Version::_vm_build_number = 0;
80 bool Abstract_VM_Version::_initialized = false;
81 unsigned int Abstract_VM_Version::_parallel_worker_threads = 0;
82 bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
83
84 #ifdef ASSERT
85 static void assert_digits(const char * s, const char * message) {
86 for (int i = 0; s[i] != '\0'; i++) {
87 assert(isdigit(s[i]), message);
88 }
89 }
90 #endif
91
92 static void set_version_field(int * version_field, const char * version_str,
93 const char * const assert_msg) {
94 if (version_str != NULL && *version_str != '\0') {
95 DEBUG_ONLY(assert_digits(version_str, assert_msg));
96 *version_field = atoi(version_str);
97 }
98 }
99
100 void Abstract_VM_Version::initialize() {
101 if (_initialized) {
|