--- old/src/hotspot/share/runtime/vm_version.cpp 2018-06-09 00:59:30.000000000 +0200 +++ new/src/hotspot/share/runtime/vm_version.cpp 2018-06-09 00:59:30.000000000 +0200 @@ -123,41 +123,48 @@ const char* Abstract_VM_Version::vm_info_string() { +#ifdef NO_SPECULATIVE_CTI +#define VM_MODE "hardened, " +#else +#define VM_MODE "" +#endif + switch (Arguments::mode()) { case Arguments::_int: - return UseSharedSpaces ? "interpreted mode, sharing" : "interpreted mode"; + return UseSharedSpaces ? VM_MODE "interpreted mode, sharing" : VM_MODE "interpreted mode"; case Arguments::_mixed: if (UseSharedSpaces) { if (UseAOT) { - return "mixed mode, aot, sharing"; + return VM_MODE "mixed mode, aot, sharing"; #ifdef TIERED } else if(is_client_compilation_mode_vm()) { - return "mixed mode, emulated-client, sharing"; + return VM_MODE "mixed mode, emulated-client, sharing"; #endif } else { - return "mixed mode, sharing"; + return VM_MODE "mixed mode, sharing"; } } else { if (UseAOT) { - return "mixed mode, aot"; + return VM_MODE "mixed mode, aot"; #ifdef TIERED } else if(is_client_compilation_mode_vm()) { - return "mixed mode, emulated-client"; + return VM_MODE "mixed mode, emulated-client"; #endif } else { - return "mixed mode"; + return VM_MODE "mixed mode"; } } case Arguments::_comp: #ifdef TIERED if (is_client_compilation_mode_vm()) { - return UseSharedSpaces ? "compiled mode, emulated-client, sharing" : "compiled mode, emulated-client"; + return UseSharedSpaces ? VM_MODE "compiled mode, emulated-client, sharing" : VM_MODE "compiled mode, emulated-client"; } #endif - return UseSharedSpaces ? "compiled mode, sharing" : "compiled mode"; + return UseSharedSpaces ? VM_MODE "compiled mode, sharing" : VM_MODE "compiled mode"; }; ShouldNotReachHere(); return ""; +#undef VM_MODE } // NOTE: do *not* use stringStream. this function is called by