From 2f5976754dcaa39e84aedd7796240bfea838ae3e Mon Sep 17 00:00:00 2001 From: shade Date: Thu, 27 Feb 2020 05:40:59 +0000 Subject: [PATCH] 8187078: -XX:+VerifyOops finds numerous problems when running JPRT Reviewed-by: andrew --- src/share/vm/c1/c1_LIRGenerator.cpp | 4 ++-- src/share/vm/runtime/java.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/share/vm/c1/c1_LIRGenerator.cpp b/src/share/vm/c1/c1_LIRGenerator.cpp index 21cd08da9..e63246d06 100644 --- a/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/src/share/vm/c1/c1_LIRGenerator.cpp @@ -2334,7 +2334,7 @@ void LIRGenerator::do_UnsafeGetObject(UnsafeGetObject* x) { __ cmp(lir_cond_equal, src_reg, LIR_OprFact::oopConst(NULL)); __ branch(lir_cond_equal, T_OBJECT, Lcont->label()); } - LIR_Opr src_klass = new_register(T_OBJECT); + LIR_Opr src_klass = new_register(T_METADATA); if (gen_type_check) { // We have determined that offset == referent_offset && src != null. // if (src->_klass->_reference_type == REF_NONE) -> continue @@ -3299,7 +3299,7 @@ void LIRGenerator::profile_parameters_at_call(ProfileCall* x) { void LIRGenerator::do_ProfileCall(ProfileCall* x) { // Need recv in a temporary register so it interferes with the other temporaries LIR_Opr recv = LIR_OprFact::illegalOpr; - LIR_Opr mdo = new_register(T_OBJECT); + LIR_Opr mdo = new_register(T_METADATA); // tmp is used to hold the counters on SPARC LIR_Opr tmp = new_pointer_register(); diff --git a/src/share/vm/runtime/java.cpp b/src/share/vm/runtime/java.cpp index 721f74321..9b49d51c3 100644 --- a/src/share/vm/runtime/java.cpp +++ b/src/share/vm/runtime/java.cpp @@ -335,7 +335,7 @@ void print_statistics() { klassVtable::print_statistics(); klassItable::print_statistics(); } - if (VerifyOops) { + if (VerifyOops && Verbose) { tty->print_cr("+VerifyOops count: %d", StubRoutines::verify_oop_count()); } -- GitLab