8280419: Remove dead code related to VerifyThread and verify_thread()

Reviewed-by: stuefe, lucy
This commit is contained in:
David Holmes 2023-02-17 02:00:32 +00:00
parent 4ce493f09e
commit b242eef93e
18 changed files with 17 additions and 79 deletions

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -68,12 +68,10 @@
void OptoRuntime::generate_exception_blob() {
// allocate space for code
ResourceMark rm;
int pad = VerifyThread ? 256 : 0;// Extra slop space for more verify code
// setup code generation tools
// Measured 8/7/03 at 256 in 32bit debug build (no VerifyThread)
// Measured 8/7/03 at 528 in 32bit debug build (VerifyThread)
CodeBuffer buffer("exception_blob", 600+pad, 512);
// Measured 8/7/03 at 256 in 32bit debug build
CodeBuffer buffer("exception_blob", 600, 512);
MacroAssembler* masm = new MacroAssembler(&buffer);
int framesize_in_words = 2; // FP + LR

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1606,13 +1606,11 @@ void SharedRuntime::generate_uncommon_trap_blob() {
ResourceMark rm;
// setup code generation tools
int pad = VerifyThread ? 512 : 0;
#ifdef _LP64
CodeBuffer buffer("uncommon_trap_blob", 2700+pad, 512);
CodeBuffer buffer("uncommon_trap_blob", 2700, 512);
#else
// Measured 8/7/03 at 660 in 32bit debug build (no VerifyThread)
// Measured 8/7/03 at 1028 in 32bit debug build (VerifyThread)
CodeBuffer buffer("uncommon_trap_blob", 2000+pad, 512);
// Measured 8/7/03 at 660 in 32bit debug build
CodeBuffer buffer("uncommon_trap_blob", 2000, 512);
#endif
// bypassed when code generation useless
MacroAssembler* masm = new MacroAssembler(&buffer);

@ -890,7 +890,6 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
}
verify_oop(R17_tos, state);
verify_thread();
merge_frames(/*top_frame_sp*/ R21_sender_SP, /*return_pc*/ R0, R11_scratch1, R12_scratch2);
mtlr(R0);
@ -1129,7 +1128,6 @@ void InterpreterMacroAssembler::call_from_interpreter(Register Rtarget_method, R
// compiled code in threads for which the event is enabled. Check here for
// interp_only_mode if these events CAN be enabled.
Label done;
verify_thread();
cmpwi(CCR0, Rinterp_only, 0);
beq(CCR0, done);
ld(Rtarget_addr, in_bytes(Method::interpreter_entry_offset()), Rtarget_method);

@ -2958,8 +2958,6 @@ void MacroAssembler::get_vm_result(Register oop_result) {
// oop_result
// R16_thread->in_bytes(JavaThread::vm_result_offset())
verify_thread();
ld(oop_result, in_bytes(JavaThread::vm_result_offset()), R16_thread);
li(R0, 0);
std(R0, in_bytes(JavaThread::vm_result_offset()), R16_thread);
@ -4230,12 +4228,6 @@ void MacroAssembler::asm_assert_mems_zero(bool check_equal, int size, int mem_of
#endif // ASSERT
}
void MacroAssembler::verify_thread() {
if (VerifyThread) {
unimplemented("'VerifyThread' currently not implemented on PPC");
}
}
void MacroAssembler::verify_coop(Register coop, const char* msg) {
if (!VerifyOops) { return; }
if (UseCompressedOops) { decode_heap_oop(coop); }

@ -894,9 +894,6 @@ class MacroAssembler: public Assembler {
asm_assert_mems_zero(false, 8, mem_offset, mem_base, msg);
}
// Verify R16_thread contents.
void verify_thread();
// Calls verify_oop. If UseCompressedOops is on, decodes the oop.
// Preserves reg.
void verify_coop(Register reg, const char*);

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -135,12 +135,10 @@ void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register meth
// JVMTI events, such as single-stepping, are implemented partly by avoiding running
// compiled code in threads for which the event is enabled. Check here for
// interp_only_mode if these events CAN be enabled.
__ verify_thread();
__ lwz(temp, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
__ cmplwi(CCR0, temp, 0);
__ beq(CCR0, run_compiled_code);
// Null method test is replicated below in compiled case,
// it might be able to address across the verify_thread()
// Null method test is replicated below in compiled case.
__ cmplwi(CCR0, R19_method, 0);
__ beq(CCR0, L_no_such_method);
__ ld(target, in_bytes(Method::interpreter_entry_offset()), R19_method);

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -2309,8 +2309,6 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
frame_done_pc = (intptr_t)__ pc();
__ verify_thread();
// Native nmethod wrappers never take possession of the oop arguments.
// So the caller will gc the arguments.
// The only thing we need an oopMap for is if the call is static.

@ -1703,8 +1703,6 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
}
#endif // ASSERT
__ verify_thread();
// --------------------------------------------------------------------------
// JVMTI support
__ notify_method_entry();
@ -1957,7 +1955,6 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
{
__ mr(Rexception, R3_RET);
__ verify_thread();
__ verify_oop(Rexception);
// Expression stack must be empty before entering the VM in case of an exception.
@ -2086,7 +2083,6 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
Interpreter::_remove_activation_entry = __ pc();
{
__ pop_ptr(Rexception);
__ verify_thread();
__ verify_oop(Rexception);
__ std(Rexception, in_bytes(JavaThread::vm_result_offset()), R16_thread);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -1635,9 +1635,6 @@ void TemplateTable::branch_conditional(ConditionRegister crx, TemplateTable::Con
void TemplateTable::branch(bool is_jsr, bool is_wide) {
// Note: on SPARC, we use InterpreterMacroAssembler::if_cmp also.
__ verify_thread();
const Register Rscratch1 = R11_scratch1,
Rscratch2 = R12_scratch2,
Rscratch3 = R3_ARG1,

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -111,7 +111,6 @@ void InterpreterMacroAssembler::dispatch_base(TosState state, address* table, bo
#endif
// TODO: Maybe implement +VerifyActivationFrameSize here.
// verify_thread(); // Too slow. We will just verify on method entry & exit.
verify_oop(Z_tos, state);
// Dispatch table to use.
@ -954,7 +953,6 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
}
verify_oop(Z_tos, state);
verify_thread();
pop_interpreter_frame(return_pc, Z_ARG2, Z_ARG3);
BLOCK_COMMENT("} remove_activation");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -3352,8 +3352,6 @@ void MacroAssembler::set_thread_state(JavaThreadState new_state) {
}
void MacroAssembler::get_vm_result(Register oop_result) {
verify_thread();
z_lg(oop_result, Address(Z_thread, JavaThread::vm_result_offset()));
clear_mem(Address(Z_thread, JavaThread::vm_result_offset()), sizeof(void*));
@ -3361,8 +3359,6 @@ void MacroAssembler::get_vm_result(Register oop_result) {
}
void MacroAssembler::get_vm_result_2(Register result) {
verify_thread();
z_lg(result, Address(Z_thread, JavaThread::vm_result_2_offset()));
clear_mem(Address(Z_thread, JavaThread::vm_result_2_offset()), sizeof(void*));
}
@ -5386,12 +5382,6 @@ void MacroAssembler::asm_assert_frame_size(Register expected_size, Register tmp,
}
#endif // !PRODUCT
void MacroAssembler::verify_thread() {
if (VerifyThread) {
unimplemented("", 117);
}
}
// Save and restore functions: Exclude Z_R0.
void MacroAssembler::save_volatile_regs(Register dst, int offset, bool include_fp, bool include_flags) {
z_stmg(Z_R1, Z_R5, offset, dst); offset += 5 * BytesPerWord;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -904,9 +904,6 @@ class MacroAssembler: public Assembler {
}
void asm_assert_frame_size(Register expected_size, Register tmp, const char* msg, int id) PRODUCT_RETURN;
// Verify Z_thread contents.
void verify_thread();
// Save and restore functions: Exclude Z_R0.
void save_volatile_regs( Register dst, int offset, bool include_fp, bool include_flags);
void restore_volatile_regs(Register src, int offset, bool include_fp, bool include_flags);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -152,15 +152,13 @@ void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register meth
// by avoiding running compiled code in threads for which the
// event is enabled. Check here for interp_only_mode if these
// events CAN be enabled.
__ verify_thread();
Label run_compiled_code;
__ load_and_test_int(temp, Address(Z_thread, JavaThread::interp_only_mode_offset()));
__ z_bre(run_compiled_code);
// Null method test is replicated below in compiled case,
// it might be able to address across the verify_thread().
// Null method test is replicated below in compiled case.,
__ z_ltgr(temp, method);
__ z_bre(L_no_such_method);

@ -76,7 +76,6 @@ void OptoRuntime::generate_exception_blob() {
Register handle_exception = Z_ARG5;
__ verify_thread();
__ z_stg(Z_ARG1/*exception oop*/, Address(Z_thread, JavaThread::exception_oop_offset()));
__ z_stg(Z_ARG2/*issuing pc*/, Address(Z_thread, JavaThread::exception_pc_offset()));

@ -1,5 +1,5 @@
//
// Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2017, 2022 SAP SE. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
@ -821,11 +821,6 @@ void MachPrologNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
st->print_cr("NOP"); st->print("\t");
}
if (VerifyThread) {
st->print_cr("Verify_Thread");
st->print("\t");
}
long framesize = C->output()->frame_size_in_bytes();
int bangsize = C->output()->bang_size_in_bytes();
@ -850,8 +845,6 @@ void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
Compile* C = ra_->C;
C2_MacroAssembler _masm(&cbuf);
__ verify_thread();
size_t framesize = C->output()->frame_size_in_bytes();
size_t bangsize = C->output()->bang_size_in_bytes();
@ -931,7 +924,6 @@ void MachEpilogNode::format(PhaseRegAlloc *ra_, outputStream *os) const {
void MachEpilogNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
C2_MacroAssembler _masm(&cbuf);
Compile* C = ra_->C;
__ verify_thread();
// If this does safepoint polling, then do it here.
bool need_polling = do_polling() && C->is_method_compilation();

@ -1547,8 +1547,6 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
wrapper_FrameDone = __ offset();
__ verify_thread();
// Native nmethod wrappers never take possession of the oop arguments.
// So the caller will gc the arguments.
// The only thing we need an oopMap for is if the call is static.
@ -1971,7 +1969,6 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
//--------------------------------------------------------------------
// Clear "last Java frame" SP and PC.
//--------------------------------------------------------------------
__ verify_thread(); // Z_thread must be correct.
__ reset_last_Java_frame();

@ -1773,8 +1773,6 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
#ifdef ASSERT
__ verify_esp(Z_esp, Z_R1_scratch);
__ verify_thread();
#endif
// jvmti support

@ -1186,9 +1186,6 @@ const int ObjectAlignmentInBytes = 8;
develop(bool, VerifyFPU, false, \
"Verify FPU state (check for NaN's, etc.)") \
\
develop(bool, VerifyThread, false, \
"Watch the thread register for corruption (SPARC only)") \
\
develop(bool, VerifyActivationFrameSize, false, \
"Verify that activation frame didn't become smaller than its " \
"minimal size") \