comparison src/share/vm/c1/c1_Runtime1.cpp @ 6385:077fd901d7c7

enhanced tracing of Graal monitor slow paths (i.e., stub calls)
author Doug Simon <doug.simon@oracle.com>
date Thu, 13 Sep 2012 17:35:43 +0200
parents 957c266d8bc5
children 6b74f44c5059
comparison
equal deleted inserted replaced
6384:2643a994e709 6385:077fd901d7c7
685 685
686 JRT_ENTRY_NO_ASYNC(void, Runtime1::graal_monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock)) 686 JRT_ENTRY_NO_ASYNC(void, Runtime1::graal_monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock))
687 NOT_PRODUCT(_monitorenter_slowcase_cnt++;) 687 NOT_PRODUCT(_monitorenter_slowcase_cnt++;)
688 #ifdef ASSERT 688 #ifdef ASSERT
689 if (TraceGraal >= 3) { 689 if (TraceGraal >= 3) {
690 tty->print_cr("entered locking slow case with obj=" INTPTR_FORMAT " and lock= " INTPTR_FORMAT, obj, lock); 690 markOop mark = obj->mark();
691 markOop dmw = mark->has_displaced_mark_helper() ? mark->displaced_mark_helper() : (markOop) (int*) 0xFFFFFFFF;
692 tty->print_cr("entered locking slow case with obj=" INTPTR_FORMAT ", mark=" INTPTR_FORMAT ", dmw=" INTPTR_FORMAT " and lock= " INTPTR_FORMAT, obj, mark, dmw , lock);
691 } 693 }
692 if (PrintBiasedLockingStatistics) { 694 if (PrintBiasedLockingStatistics) {
693 Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); 695 Atomic::inc(BiasedLocking::slow_path_entry_count_addr());
694 } 696 }
695 #endif 697 #endif
739 // When using fast locking, the compiled code has already tried the fast case 741 // When using fast locking, the compiled code has already tried the fast case
740 ObjectSynchronizer::slow_exit(obj, lock, THREAD); 742 ObjectSynchronizer::slow_exit(obj, lock, THREAD);
741 } else { 743 } else {
742 ObjectSynchronizer::fast_exit(obj, lock, THREAD); 744 ObjectSynchronizer::fast_exit(obj, lock, THREAD);
743 } 745 }
746 #ifdef ASSERT
747 if (TraceGraal >= 3) {
748 tty->print_cr("exited locking slow case with obj=" INTPTR_FORMAT ", mark=" INTPTR_FORMAT " and lock= " INTPTR_FORMAT, obj, obj->mark(), lock);
749 }
750 #endif
744 JRT_END 751 JRT_END
745 752
746 JRT_ENTRY(void, Runtime1::graal_log_object(JavaThread* thread, oop obj, jboolean newline, jboolean string)) 753 JRT_ENTRY(void, Runtime1::graal_log_object(JavaThread* thread, oop obj, jboolean newline, jboolean string))
747 if (!string) { 754 if (!string) {
748 tty->print("%p", obj); 755 tty->print("%p", obj);