diff --git a/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp b/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp index de7249f277ab2de32a143a6383cf9344b353a971..abbd673b6ba0f26b2dd20024ede409bcb2a7e526 100644 --- a/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp +++ b/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp @@ -85,17 +85,17 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) } #undef __ -// size of C2 call stub, compiled java to interpretor -int CompiledStaticCall::to_interp_stub_size() { - return 8 * NativeInstruction::instruction_size; -} - // Relocation entries for call stub, compiled java to interpreter. int CompiledStaticCall::reloc_to_interp_stub() { return 10; // 4 in emit_to_interp_stub + 1 in Java_Static_Call } #endif // COMPILER2 || JVMCI +// size of C2 call stub, compiled java to interpretor +int CompiledStaticCall::to_interp_stub_size() { + return 8 * NativeInstruction::instruction_size; +} + void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(/*is_aot*/ false); guarantee(stub != NULL, "stub not found"); @@ -125,6 +125,8 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad method_holder->set_data((intptr_t)callee()); jump->set_jump_destination(entry); + ICache::invalidate_range(stub, to_interp_stub_size()); + // Update jump to call. set_destination_mt_safe(stub); } diff --git a/hotspot/test/runtime/Metaspace/DefineClass.java b/hotspot/test/runtime/Metaspace/DefineClass.java index 3e3f730b7db5ede7aa9e072d3c1d39f381fe7d6e..4563e56366f77964071143ab2dbf8ad6d38bf505 100644 --- a/hotspot/test/runtime/Metaspace/DefineClass.java +++ b/hotspot/test/runtime/Metaspace/DefineClass.java @@ -24,6 +24,7 @@ /** * @test * @bug 8173743 + * @requires vm.compMode != "Xcomp" * @summary Failures during class definition can lead to memory leaks in metaspace * @library /test/lib * @run main/othervm test.DefineClass defineClass diff --git a/hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java b/hotspot/test/serviceability/sa/TestPrintMdo.java similarity index 100% rename from hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java rename to hotspot/test/serviceability/sa/TestPrintMdo.java