Mercurial > hg > graal-jvmci-8
diff src/share/vm/c1/c1_Runtime1.cpp @ 1480:2fe369533fed
Additional debug output.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Sat, 27 Nov 2010 16:43:53 +0100 |
parents | 7641338cfc92 |
children | 2d26b0046e0d |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Runtime1.cpp Sat Nov 27 14:30:07 2010 +0100 +++ b/src/share/vm/c1/c1_Runtime1.cpp Sat Nov 27 16:43:53 2010 +0100 @@ -637,7 +637,19 @@ EXCEPTION_MARK; oop obj = lock->obj(); - assert(obj->is_oop(), "must be NULL or an object"); + +#ifdef DEBUG + if (!obj->is_oop()) { + ResetNoHandleMark rhm; + nmethod* method = thread->last_frame().cb()->as_nmethod_or_null(); + if (method != NULL) { + tty->print_cr("ERROR in monitorexit in method %s", method->name()); + } + thread->print_stack_on(tty); + assert(false, "invalid lock object pointer dected"); + } +#endif + if (UseFastLocking) { // When using fast locking, the compiled code has already tried the fast case ObjectSynchronizer::slow_exit(obj, lock->lock(), THREAD);