Mercurial > hg > truffle
diff src/share/vm/oops/methodOop.cpp @ 2935:9b8f30608e62
deoptimization action (invalidate, reprofile, ...)
more debug properties and assertions
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 10 Jun 2011 15:01:14 +0200 |
parents | 328926869b15 |
children | be4ca325525a |
line wrap: on
line diff
--- a/src/share/vm/oops/methodOop.cpp Thu Jun 09 20:25:38 2011 +0200 +++ b/src/share/vm/oops/methodOop.cpp Fri Jun 10 15:01:14 2011 +0200 @@ -206,6 +206,12 @@ } address methodOopDesc::bcp_from(int bci) const { +#ifdef ASSERT + if (!((is_native() && bci == 0) || (!is_native() && 0 <= bci && bci < code_size()))) { + char buf[1024]; + tty->print_cr("bci: %i, size: %i, method: %s", bci, code_size(), const_cast<methodOop>(this)->name_and_sig_as_C_string(buf, 1024)); + } +#endif // ASSERT assert((is_native() && bci == 0) || (!is_native() && 0 <= bci && bci < code_size()), "illegal bci"); address bcp = code_base() + bci; assert(is_native() && bcp == code_base() || contains(bcp), "bcp doesn't belong to this method");