8255900: x86: Reduce impact when VerifyOops is disabled
Reviewed-by: neliasso, minqi, kvn
This commit is contained in:
parent
29db1dcd62
commit
a0ade22057
@ -1959,7 +1959,7 @@ void InterpreterMacroAssembler::profile_switch_case(Register index,
|
||||
|
||||
void InterpreterMacroAssembler::_interp_verify_oop(Register reg, TosState state, const char* file, int line) {
|
||||
if (state == atos) {
|
||||
MacroAssembler::_verify_oop(reg, "broken oop", file, line);
|
||||
MacroAssembler::_verify_oop_checked(reg, "broken oop", file, line);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -370,11 +370,6 @@ void MacroAssembler::pushptr(AddressLiteral src) {
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::set_word_if_not_zero(Register dst) {
|
||||
xorl(dst, dst);
|
||||
set_byte_if_not_zero(dst);
|
||||
}
|
||||
|
||||
static void pass_arg0(MacroAssembler* masm, Register arg) {
|
||||
masm->push(arg);
|
||||
}
|
||||
@ -3993,7 +3988,6 @@ Address MacroAssembler::argument_address(RegisterOrConstant arg_slot,
|
||||
return Address(rsp, scale_reg, scale_factor, offset);
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::_verify_oop_addr(Address addr, const char* s, const char* file, int line) {
|
||||
if (!VerifyOops) return;
|
||||
|
||||
|
@ -583,22 +583,30 @@ class MacroAssembler: public Assembler {
|
||||
// method handles (JSR 292)
|
||||
Address argument_address(RegisterOrConstant arg_slot, int extra_slot_offset = 0);
|
||||
|
||||
//----
|
||||
void set_word_if_not_zero(Register reg); // sets reg to 1 if not zero, otherwise 0
|
||||
|
||||
// Debugging
|
||||
|
||||
// only if +VerifyOops
|
||||
void _verify_oop(Register reg, const char* s, const char* file, int line);
|
||||
void _verify_oop_addr(Address addr, const char* s, const char* file, int line);
|
||||
|
||||
void _verify_oop_checked(Register reg, const char* s, const char* file, int line) {
|
||||
if (VerifyOops) {
|
||||
_verify_oop(reg, s, file, line);
|
||||
}
|
||||
}
|
||||
void _verify_oop_addr_checked(Address reg, const char* s, const char* file, int line) {
|
||||
if (VerifyOops) {
|
||||
_verify_oop_addr(reg, s, file, line);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: verify method and klass metadata (compare against vptr?)
|
||||
void _verify_method_ptr(Register reg, const char * msg, const char * file, int line) {}
|
||||
void _verify_klass_ptr(Register reg, const char * msg, const char * file, int line){}
|
||||
|
||||
#define verify_oop(reg) _verify_oop(reg, "broken oop " #reg, __FILE__, __LINE__)
|
||||
#define verify_oop_msg(reg, msg) _verify_oop(reg, "broken oop " #reg ", " #msg, __FILE__, __LINE__)
|
||||
#define verify_oop_addr(addr) _verify_oop_addr(addr, "broken oop addr " #addr, __FILE__, __LINE__)
|
||||
#define verify_oop(reg) _verify_oop_checked(reg, "broken oop " #reg, __FILE__, __LINE__)
|
||||
#define verify_oop_msg(reg, msg) _verify_oop_checked(reg, "broken oop " #reg ", " #msg, __FILE__, __LINE__)
|
||||
#define verify_oop_addr(addr) _verify_oop_addr_checked(addr, "broken oop addr " #addr, __FILE__, __LINE__)
|
||||
#define verify_method_ptr(reg) _verify_method_ptr(reg, "broken method " #reg, __FILE__, __LINE__)
|
||||
#define verify_klass_ptr(reg) _verify_klass_ptr(reg, "broken klass " #reg, __FILE__, __LINE__)
|
||||
|
||||
|
@ -6851,7 +6851,9 @@ address generate_avx_ghash_processBlocks() {
|
||||
StubRoutines::x86::_vector_iota_indices = generate_iota_indices("iota_indices");
|
||||
|
||||
// support for verify_oop (must happen after universe_init)
|
||||
StubRoutines::_verify_oop_subroutine_entry = generate_verify_oop();
|
||||
if (VerifyOops) {
|
||||
StubRoutines::_verify_oop_subroutine_entry = generate_verify_oop();
|
||||
}
|
||||
|
||||
// data cache line writeback
|
||||
StubRoutines::_data_cache_writeback = generate_data_cache_writeback();
|
||||
|
Loading…
x
Reference in New Issue
Block a user