Skip to content

Commit 601ac00

Browse files
committed
8360776: Enable -XX:+UseAPX as experimental feature in all builds
1 parent 20e0055 commit 601ac00

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

src/hotspot/cpu/x86/vm_version_x86.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
440440
__ andl(rax, Address(rbp, in_bytes(VM_Version::xem_xcr0_offset()))); // xcr0 bits apx_f
441441
__ jcc(Assembler::equal, vector_save_restore);
442442

443-
#ifndef PRODUCT
444443
bool save_apx = UseAPX;
445444
VM_Version::set_apx_cpuFeatures();
446445
UseAPX = true;
@@ -457,7 +456,6 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
457456
__ movq(Address(rsi, 8), r31);
458457

459458
UseAPX = save_apx;
460-
#endif
461459
__ bind(vector_save_restore);
462460
//
463461
// Check if OS has enabled XGETBV instruction to access XCR0
@@ -1022,8 +1020,6 @@ void VM_Version::get_processor_features() {
10221020
if (UseAPX && !apx_supported) {
10231021
warning("UseAPX is not supported on this CPU, setting it to false");
10241022
FLAG_SET_DEFAULT(UseAPX, false);
1025-
} else if (FLAG_IS_DEFAULT(UseAPX)) {
1026-
FLAG_SET_DEFAULT(UseAPX, apx_supported ? true : false);
10271023
}
10281024

10291025
if (!UseAPX) {
@@ -3151,17 +3147,11 @@ bool VM_Version::os_supports_apx_egprs() {
31513147
if (!supports_apx_f()) {
31523148
return false;
31533149
}
3154-
// Enable APX support for product builds after
3155-
// completion of planned features listed in JDK-8329030.
3156-
#if !defined(PRODUCT)
31573150
if (_cpuid_info.apx_save[0] != egpr_test_value() ||
31583151
_cpuid_info.apx_save[1] != egpr_test_value()) {
31593152
return false;
31603153
}
31613154
return true;
3162-
#else
3163-
return false;
3164-
#endif
31653155
}
31663156

31673157
uint VM_Version::cores_per_cpu() {

src/hotspot/os/windows/os_windows.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,15 +2623,13 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
26232623
return Handle_Exception(exceptionInfo, VM_Version::cpuinfo_cont_addr());
26242624
}
26252625

2626-
#if !defined(PRODUCT)
26272626
if ((exception_code == EXCEPTION_ACCESS_VIOLATION) &&
26282627
VM_Version::is_cpuinfo_segv_addr_apx(pc)) {
26292628
// Verify that OS save/restore APX registers.
26302629
VM_Version::clear_apx_test_state();
26312630
return Handle_Exception(exceptionInfo, VM_Version::cpuinfo_cont_addr_apx());
26322631
}
26332632
#endif
2634-
#endif
26352633

26362634
#ifdef CAN_SHOW_REGISTERS_ON_ASSERT
26372635
if (VMError::was_assert_poison_crash(exception_record)) {

src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,13 +429,11 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
429429
stub = VM_Version::cpuinfo_cont_addr();
430430
}
431431

432-
#if !defined(PRODUCT) && defined(_LP64)
433432
if ((sig == SIGSEGV || sig == SIGBUS) && VM_Version::is_cpuinfo_segv_addr_apx(pc)) {
434433
// Verify that OS save/restore APX registers.
435434
stub = VM_Version::cpuinfo_cont_addr_apx();
436435
VM_Version::clear_apx_test_state();
437436
}
438-
#endif
439437

440438
// We test if stub is already set (by the stack overflow code
441439
// above) so it is not overwritten by the code that follows. This

src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,11 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
255255
stub = VM_Version::cpuinfo_cont_addr();
256256
}
257257

258-
#if !defined(PRODUCT) && defined(_LP64)
259258
if ((sig == SIGSEGV) && VM_Version::is_cpuinfo_segv_addr_apx(pc)) {
260259
// Verify that OS save/restore APX registers.
261260
stub = VM_Version::cpuinfo_cont_addr_apx();
262261
VM_Version::clear_apx_test_state();
263262
}
264-
#endif
265263

266264
if (thread->thread_state() == _thread_in_Java) {
267265
// Java thread running in Java code => find exception handler if any

0 commit comments

Comments
 (0)