diff --git a/src/share/vm/oops/method.cpp b/src/share/vm/oops/method.cpp index e6f3a4a7ecd575e49385917797e406689c67a0ab..1b7db1adad4e3dd893084ae4fd829d08201354fe 100644 --- a/src/share/vm/oops/method.cpp +++ b/src/share/vm/oops/method.cpp @@ -251,8 +251,12 @@ void Method::mask_for(int bci, InterpreterOopMap* mask) { int Method::bci_from(address bcp) const { +#ifdef ASSERT + { ResourceMark rm; assert(is_native() && bcp == code_base() || contains(bcp) || is_error_reported(), err_msg("bcp doesn't belong to this method: bcp: " INTPTR_FORMAT ", method: %s", bcp, name_and_sig_as_C_string())); + } +#endif return bcp - code_base(); }