Skip to content

Commit dbfac0f

Browse files
committed
remove EnableJVMCI flag
1 parent e0c2cb4 commit dbfac0f

File tree

133 files changed

+334
-508
lines changed

Some content is hidden

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

133 files changed

+334
-508
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
@@ -937,15 +937,13 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
937937
__ movptr(r11, Address(rbx, in_bytes(Method::from_compiled_offset())));
938938

939939
#if INCLUDE_JVMCI
940-
if (EnableJVMCI) {
941-
// check if this call should be routed towards a specific entry point
942-
__ cmpptr(Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())), 0);
943-
Label no_alternative_target;
944-
__ jcc(Assembler::equal, no_alternative_target);
945-
__ movptr(r11, Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
946-
__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())), 0);
947-
__ bind(no_alternative_target);
948-
}
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);
949947
#endif // INCLUDE_JVMCI
950948

951949
// Now generate the shuffle code. Pick up all register args and move the
@@ -2645,9 +2643,7 @@ void SharedRuntime::generate_deopt_blob() {
26452643
pad += 1024;
26462644
}
26472645
#if INCLUDE_JVMCI
2648-
if (EnableJVMCI) {
2649-
pad += 512; // Increase the buffer size when compiling for JVMCI
2650-
}
2646+
pad += 512; // Increase the buffer size for JVMCI
26512647
#endif
26522648
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
26532649
CodeBuffer buffer(name, 2560+pad, 1024);
@@ -2717,35 +2713,30 @@ void SharedRuntime::generate_deopt_blob() {
27172713

27182714
#if INCLUDE_JVMCI
27192715
Label after_fetch_unroll_info_call;
2720-
int implicit_exception_uncommon_trap_offset = 0;
2721-
int uncommon_trap_offset = 0;
2722-
2723-
if (EnableJVMCI) {
2724-
implicit_exception_uncommon_trap_offset = __ pc() - start;
2716+
int implicit_exception_uncommon_trap_offset = __ pc() - start;
27252717

2726-
__ pushptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
2727-
__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), NULL_WORD);
2718+
__ pushptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
2719+
__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), NULL_WORD);
27282720

2729-
uncommon_trap_offset = __ pc() - start;
2721+
int uncommon_trap_offset = __ pc() - start;
27302722

2731-
// Save everything in sight.
2732-
RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
2733-
// fetch_unroll_info needs to call last_java_frame()
2734-
__ set_last_Java_frame(noreg, noreg, nullptr, rscratch1);
2723+
// Save everything in sight.
2724+
RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
2725+
// fetch_unroll_info needs to call last_java_frame()
2726+
__ set_last_Java_frame(noreg, noreg, nullptr, rscratch1);
27352727

2736-
__ movl(c_rarg1, Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())));
2737-
__ movl(Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())), -1);
2728+
__ movl(c_rarg1, Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())));
2729+
__ movl(Address(r15_thread, in_bytes(JavaThread::pending_deoptimization_offset())), -1);
27382730

2739-
__ movl(r14, Deoptimization::Unpack_reexecute);
2740-
__ mov(c_rarg0, r15_thread);
2741-
__ movl(c_rarg2, r14); // exec mode
2742-
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
2743-
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
2731+
__ movl(r14, Deoptimization::Unpack_reexecute);
2732+
__ mov(c_rarg0, r15_thread);
2733+
__ movl(c_rarg2, r14); // exec mode
2734+
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
2735+
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
27442736

2745-
__ reset_last_Java_frame(false);
2737+
__ reset_last_Java_frame(false);
27462738

2747-
__ jmp(after_fetch_unroll_info_call);
2748-
} // EnableJVMCI
2739+
__ jmp(after_fetch_unroll_info_call);
27492740
#endif // INCLUDE_JVMCI
27502741

27512742
int exception_offset = __ pc() - start;
@@ -2833,9 +2824,7 @@ void SharedRuntime::generate_deopt_blob() {
28332824
__ reset_last_Java_frame(false);
28342825

28352826
#if INCLUDE_JVMCI
2836-
if (EnableJVMCI) {
2837-
__ bind(after_fetch_unroll_info_call);
2838-
}
2827+
__ bind(after_fetch_unroll_info_call);
28392828
#endif
28402829

28412830
// Load UnrollBlock* into rdi
@@ -2996,10 +2985,8 @@ void SharedRuntime::generate_deopt_blob() {
29962985
_deopt_blob = DeoptimizationBlob::create(&buffer, oop_maps, 0, exception_offset, reexecute_offset, frame_size_in_words);
29972986
_deopt_blob->set_unpack_with_exception_in_tls_offset(exception_in_tls_offset);
29982987
#if INCLUDE_JVMCI
2999-
if (EnableJVMCI) {
3000-
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
3001-
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
3002-
}
2988+
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2989+
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
30032990
#endif
30042991
}
30052992

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
272272
#if INCLUDE_JVMCI
273273
// Check if we need to take lock at entry of synchronized method. This can
274274
// only occur on method entry so emit it only for vtos with step 0.
275-
if (EnableJVMCI && state == vtos && step == 0) {
275+
if (state == vtos && step == 0) {
276276
Label L;
277277
__ cmpb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
278278
__ jcc(Assembler::zero, L);
@@ -285,13 +285,11 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
285285
__ bind(L);
286286
} else {
287287
#ifdef ASSERT
288-
if (EnableJVMCI) {
289-
Label L;
290-
__ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
291-
__ jcc(Assembler::zero, L);
292-
__ stop("unexpected pending monitor in deopt entry");
293-
__ bind(L);
294-
}
288+
Label L;
289+
__ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
290+
__ jcc(Assembler::zero, L);
291+
__ stop("unexpected pending monitor in deopt entry");
292+
__ bind(L);
295293
#endif
296294
}
297295
#endif

0 commit comments

Comments
 (0)