Skip to content

Commit c4f083c

Browse files
committed
remove EnableJVMCI flag
1 parent a7359a5 commit c4f083c

File tree

134 files changed

+352
-502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+352
-502
lines changed

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -603,15 +603,13 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
603603
__ ldr(rscratch1, Address(rmethod, in_bytes(Method::from_compiled_offset())));
604604

605605
#if INCLUDE_JVMCI
606-
if (EnableJVMCI) {
607-
// check if this call should be routed towards a specific entry point
608-
__ ldr(rscratch2, Address(rthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
609-
Label no_alternative_target;
610-
__ cbz(rscratch2, no_alternative_target);
611-
__ mov(rscratch1, rscratch2);
612-
__ str(zr, Address(rthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
613-
__ bind(no_alternative_target);
614-
}
606+
// check if this call should be routed towards a specific entry point
607+
__ ldr(rscratch2, Address(rthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
608+
Label no_alternative_target;
609+
__ cbz(rscratch2, no_alternative_target);
610+
__ mov(rscratch1, rscratch2);
611+
__ str(zr, Address(rthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
612+
__ bind(no_alternative_target);
615613
#endif // INCLUDE_JVMCI
616614

617615
// Now generate the shuffle code.
@@ -2212,9 +2210,7 @@ void SharedRuntime::generate_deopt_blob() {
22122210
// Setup code generation tools
22132211
int pad = 0;
22142212
#if INCLUDE_JVMCI
2215-
if (EnableJVMCI) {
2216-
pad += 512; // Increase the buffer size when compiling for JVMCI
2217-
}
2213+
pad += 512; // Increase the buffer size for JVMCI
22182214
#endif
22192215
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
22202216
CodeBuffer buffer(name, 2048+pad, 1024);
@@ -2285,12 +2281,9 @@ void SharedRuntime::generate_deopt_blob() {
22852281

22862282
#if INCLUDE_JVMCI
22872283
Label after_fetch_unroll_info_call;
2288-
int implicit_exception_uncommon_trap_offset = 0;
2289-
int uncommon_trap_offset = 0;
2290-
2291-
if (EnableJVMCI) {
2292-
implicit_exception_uncommon_trap_offset = __ pc() - start;
2293-
2284+
int implicit_exception_uncommon_trap_offset = __ pc() - start;
2285+
int uncommon_trap_offset;
2286+
{
22942287
__ ldr(lr, Address(rthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
22952288
__ str(zr, Address(rthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
22962289

@@ -2310,16 +2303,16 @@ void SharedRuntime::generate_deopt_blob() {
23102303
__ mov(c_rarg0, rthread);
23112304
__ movw(c_rarg2, rcpool); // exec mode
23122305
__ lea(rscratch1,
2313-
RuntimeAddress(CAST_FROM_FN_PTR(address,
2314-
Deoptimization::uncommon_trap)));
2306+
RuntimeAddress(CAST_FROM_FN_PTR(address,
2307+
Deoptimization::uncommon_trap)));
23152308
__ blr(rscratch1);
23162309
__ bind(retaddr);
23172310
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
23182311

23192312
__ reset_last_Java_frame(false);
23202313

23212314
__ b(after_fetch_unroll_info_call);
2322-
} // EnableJVMCI
2315+
}
23232316
#endif // INCLUDE_JVMCI
23242317

23252318
int exception_offset = __ pc() - start;
@@ -2413,9 +2406,7 @@ void SharedRuntime::generate_deopt_blob() {
24132406
__ reset_last_Java_frame(false);
24142407

24152408
#if INCLUDE_JVMCI
2416-
if (EnableJVMCI) {
2417-
__ bind(after_fetch_unroll_info_call);
2418-
}
2409+
__ bind(after_fetch_unroll_info_call);
24192410
#endif
24202411

24212412
// Load UnrollBlock* into r5
@@ -2575,10 +2566,8 @@ void SharedRuntime::generate_deopt_blob() {
25752566
_deopt_blob = DeoptimizationBlob::create(&buffer, oop_maps, 0, exception_offset, reexecute_offset, frame_size_in_words);
25762567
_deopt_blob->set_unpack_with_exception_in_tls_offset(exception_in_tls_offset);
25772568
#if INCLUDE_JVMCI
2578-
if (EnableJVMCI) {
2579-
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2580-
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
2581-
}
2569+
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2570+
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
25822571
#endif
25832572
}
25842573

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
527527
#if INCLUDE_JVMCI
528528
// Check if we need to take lock at entry of synchronized method. This can
529529
// only occur on method entry so emit it only for vtos with step 0.
530-
if (EnableJVMCI && state == vtos && step == 0) {
530+
if (state == vtos && step == 0) {
531531
Label L;
532532
__ ldrb(rscratch1, Address(rthread, JavaThread::pending_monitorenter_offset()));
533533
__ cbz(rscratch1, L);
@@ -538,13 +538,11 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
538538
__ bind(L);
539539
} else {
540540
#ifdef ASSERT
541-
if (EnableJVMCI) {
542-
Label L;
543-
__ ldrb(rscratch1, Address(rthread, JavaThread::pending_monitorenter_offset()));
544-
__ cbz(rscratch1, L);
545-
__ stop("unexpected pending monitor in deopt entry");
546-
__ bind(L);
547-
}
541+
Label L;
542+
__ ldrb(rscratch1, Address(rthread, JavaThread::pending_monitorenter_offset()));
543+
__ cbz(rscratch1, L);
544+
__ stop("unexpected pending monitor in deopt entry");
545+
__ bind(L);
548546
#endif
549547
}
550548
#endif

src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -493,15 +493,13 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
493493
__ ld(t1, Address(xmethod, in_bytes(Method::from_compiled_offset())));
494494

495495
#if INCLUDE_JVMCI
496-
if (EnableJVMCI) {
497-
// check if this call should be routed towards a specific entry point
498-
__ ld(t0, Address(xthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
499-
Label no_alternative_target;
500-
__ beqz(t0, no_alternative_target);
501-
__ mv(t1, t0);
502-
__ sd(zr, Address(xthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
503-
__ bind(no_alternative_target);
504-
}
496+
// check if this call should be routed towards a specific entry point
497+
__ ld(t0, Address(xthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
498+
Label no_alternative_target;
499+
__ beqz(t0, no_alternative_target);
500+
__ mv(t1, t0);
501+
__ sd(zr, Address(xthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
502+
__ bind(no_alternative_target);
505503
#endif // INCLUDE_JVMCI
506504

507505
// Now generate the shuffle code.
@@ -2084,9 +2082,7 @@ void SharedRuntime::generate_deopt_blob() {
20842082
// Setup code generation tools
20852083
int pad = 0;
20862084
#if INCLUDE_JVMCI
2087-
if (EnableJVMCI) {
2088-
pad += 512; // Increase the buffer size when compiling for JVMCI
2089-
}
2085+
pad += 512; // Increase the buffer size for JVMCI
20902086
#endif
20912087
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
20922088
CodeBuffer buffer(name, 2048 + pad, 1024);
@@ -2158,38 +2154,33 @@ void SharedRuntime::generate_deopt_blob() {
21582154

21592155
#if INCLUDE_JVMCI
21602156
Label after_fetch_unroll_info_call;
2161-
int implicit_exception_uncommon_trap_offset = 0;
2162-
int uncommon_trap_offset = 0;
2163-
2164-
if (EnableJVMCI) {
2165-
implicit_exception_uncommon_trap_offset = __ pc() - start;
2157+
int implicit_exception_uncommon_trap_offset = __ pc() - start;
21662158

2167-
__ ld(ra, Address(xthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
2168-
__ sd(zr, Address(xthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
2159+
__ ld(ra, Address(xthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
2160+
__ sd(zr, Address(xthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
21692161

2170-
uncommon_trap_offset = __ pc() - start;
2162+
int uncommon_trap_offset = __ pc() - start;
21712163

2172-
// Save everything in sight.
2173-
reg_saver.save_live_registers(masm, 0, &frame_size_in_words);
2174-
// fetch_unroll_info needs to call last_java_frame()
2175-
Label retaddr;
2176-
__ set_last_Java_frame(sp, noreg, retaddr, t0);
2164+
// Save everything in sight.
2165+
reg_saver.save_live_registers(masm, 0, &frame_size_in_words);
2166+
// fetch_unroll_info needs to call last_java_frame()
2167+
Label retaddr;
2168+
__ set_last_Java_frame(sp, noreg, retaddr, t0);
21772169

2178-
__ lw(c_rarg1, Address(xthread, in_bytes(JavaThread::pending_deoptimization_offset())));
2179-
__ mv(t0, -1);
2180-
__ sw(t0, Address(xthread, in_bytes(JavaThread::pending_deoptimization_offset())));
2170+
__ lw(c_rarg1, Address(xthread, in_bytes(JavaThread::pending_deoptimization_offset())));
2171+
__ mv(t0, -1);
2172+
__ sw(t0, Address(xthread, in_bytes(JavaThread::pending_deoptimization_offset())));
21812173

2182-
__ mv(xcpool, Deoptimization::Unpack_reexecute);
2183-
__ mv(c_rarg0, xthread);
2184-
__ orrw(c_rarg2, zr, xcpool); // exec mode
2185-
__ rt_call(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap));
2186-
__ bind(retaddr);
2187-
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
2174+
__ mv(xcpool, Deoptimization::Unpack_reexecute);
2175+
__ mv(c_rarg0, xthread);
2176+
__ orrw(c_rarg2, zr, xcpool); // exec mode
2177+
__ rt_call(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap));
2178+
__ bind(retaddr);
2179+
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
21882180

2189-
__ reset_last_Java_frame(false);
2181+
__ reset_last_Java_frame(false);
21902182

2191-
__ j(after_fetch_unroll_info_call);
2192-
} // EnableJVMCI
2183+
__ j(after_fetch_unroll_info_call);
21932184
#endif // INCLUDE_JVMCI
21942185

21952186
int exception_offset = __ pc() - start;
@@ -2284,9 +2275,7 @@ void SharedRuntime::generate_deopt_blob() {
22842275
__ reset_last_Java_frame(false);
22852276

22862277
#if INCLUDE_JVMCI
2287-
if (EnableJVMCI) {
2288-
__ bind(after_fetch_unroll_info_call);
2289-
}
2278+
__ bind(after_fetch_unroll_info_call);
22902279
#endif
22912280

22922281
// Load UnrollBlock* into x15
@@ -2443,10 +2432,8 @@ void SharedRuntime::generate_deopt_blob() {
24432432
assert(_deopt_blob != nullptr, "create deoptimization blob fail!");
24442433
_deopt_blob->set_unpack_with_exception_in_tls_offset(exception_in_tls_offset);
24452434
#if INCLUDE_JVMCI
2446-
if (EnableJVMCI) {
2447-
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2448-
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
2449-
}
2435+
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2436+
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
24502437
#endif
24512438
}
24522439

src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -936,15 +936,13 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
936936
__ movptr(r11, Address(rbx, in_bytes(Method::from_compiled_offset())));
937937

938938
#if INCLUDE_JVMCI
939-
if (EnableJVMCI) {
940-
// check if this call should be routed towards a specific entry point
941-
__ cmpptr(Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())), 0);
942-
Label no_alternative_target;
943-
__ jcc(Assembler::equal, no_alternative_target);
944-
__ movptr(r11, Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
945-
__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())), 0);
946-
__ bind(no_alternative_target);
947-
}
939+
// check if this call should be routed towards a specific entry point
940+
__ cmpptr(Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())), 0);
941+
Label no_alternative_target;
942+
__ jcc(Assembler::equal, no_alternative_target);
943+
__ movptr(r11, Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
944+
__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())), 0);
945+
__ bind(no_alternative_target);
948946
#endif // INCLUDE_JVMCI
949947

950948
// Now generate the shuffle code. Pick up all register args and move the
@@ -2643,9 +2641,7 @@ void SharedRuntime::generate_deopt_blob() {
26432641
pad += 1024;
26442642
}
26452643
#if INCLUDE_JVMCI
2646-
if (EnableJVMCI) {
2647-
pad += 512; // Increase the buffer size when compiling for JVMCI
2648-
}
2644+
pad += 512; // Increase the buffer size for JVMCI
26492645
#endif
26502646
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
26512647
CodeBuffer buffer(name, 2560+pad, 1024);
@@ -2715,35 +2711,30 @@ void SharedRuntime::generate_deopt_blob() {
27152711

27162712
#if INCLUDE_JVMCI
27172713
Label after_fetch_unroll_info_call;
2718-
int implicit_exception_uncommon_trap_offset = 0;
2719-
int uncommon_trap_offset = 0;
2720-
2721-
if (EnableJVMCI) {
2722-
implicit_exception_uncommon_trap_offset = __ pc() - start;
2714+
int implicit_exception_uncommon_trap_offset = __ pc() - start;
27232715

2724-
__ pushptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
2725-
__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), NULL_WORD);
2716+
__ pushptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
2717+
__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), NULL_WORD);
27262718

2727-
uncommon_trap_offset = __ pc() - start;
2719+
int uncommon_trap_offset = __ pc() - start;
27282720

2729-
// Save everything in sight.
2730-
RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
2731-
// fetch_unroll_info needs to call last_java_frame()
2732-
__ set_last_Java_frame(noreg, noreg, nullptr, rscratch1);
2721+
// Save everything in sight.
2722+
RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
2723+
// fetch_unroll_info needs to call last_java_frame()
2724+
__ set_last_Java_frame(noreg, noreg, nullptr, rscratch1);
27332725

2734-
__ movl(c_rarg1, Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())));
2735-
__ movl(Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())), -1);
2726+
__ movl(c_rarg1, Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())));
2727+
__ movl(Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())), -1);
27362728

2737-
__ movl(r14, Deoptimization::Unpack_reexecute);
2738-
__ mov(c_rarg0, r15_thread);
2739-
__ movl(c_rarg2, r14); // exec mode
2740-
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
2741-
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
2729+
__ movl(r14, Deoptimization::Unpack_reexecute);
2730+
__ mov(c_rarg0, r15_thread);
2731+
__ movl(c_rarg2, r14); // exec mode
2732+
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
2733+
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
27422734

2743-
__ reset_last_Java_frame(false);
2735+
__ reset_last_Java_frame(false);
27442736

2745-
__ jmp(after_fetch_unroll_info_call);
2746-
} // EnableJVMCI
2737+
__ jmp(after_fetch_unroll_info_call);
27472738
#endif // INCLUDE_JVMCI
27482739

27492740
int exception_offset = __ pc() - start;
@@ -2831,9 +2822,7 @@ void SharedRuntime::generate_deopt_blob() {
28312822
__ reset_last_Java_frame(false);
28322823

28332824
#if INCLUDE_JVMCI
2834-
if (EnableJVMCI) {
2835-
__ bind(after_fetch_unroll_info_call);
2836-
}
2825+
__ bind(after_fetch_unroll_info_call);
28372826
#endif
28382827

28392828
// Load UnrollBlock* into rdi
@@ -2994,10 +2983,8 @@ void SharedRuntime::generate_deopt_blob() {
29942983
_deopt_blob = DeoptimizationBlob::create(&buffer, oop_maps, 0, exception_offset, reexecute_offset, frame_size_in_words);
29952984
_deopt_blob->set_unpack_with_exception_in_tls_offset(exception_in_tls_offset);
29962985
#if INCLUDE_JVMCI
2997-
if (EnableJVMCI) {
2998-
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2999-
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
3000-
}
2986+
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2987+
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
30012988
#endif
30022989
}
30032990

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
227227
#if INCLUDE_JVMCI
228228
// Check if we need to take lock at entry of synchronized method. This can
229229
// only occur on method entry so emit it only for vtos with step 0.
230-
if (EnableJVMCI && state == vtos && step == 0) {
230+
if (state == vtos && step == 0) {
231231
Label L;
232232
__ cmpb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
233233
__ jcc(Assembler::zero, L);
@@ -240,13 +240,11 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
240240
__ bind(L);
241241
} else {
242242
#ifdef ASSERT
243-
if (EnableJVMCI) {
244-
Label L;
245-
__ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
246-
__ jcc(Assembler::zero, L);
247-
__ stop("unexpected pending monitor in deopt entry");
248-
__ bind(L);
249-
}
243+
Label L;
244+
__ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
245+
__ jcc(Assembler::zero, L);
246+
__ stop("unexpected pending monitor in deopt entry");
247+
__ bind(L);
250248
#endif
251249
}
252250
#endif

0 commit comments

Comments
 (0)