1.1 --- a/src/share/vm/opto/macro.cpp Fri Nov 27 07:56:58 2009 -0800 1.2 +++ b/src/share/vm/opto/macro.cpp Thu Nov 12 09:24:21 2009 -0800 1.3 @@ -912,15 +912,29 @@ 1.4 return false; 1.5 } 1.6 1.7 + CompileLog* log = C->log(); 1.8 + if (log != NULL) { 1.9 + Node* klass = alloc->in(AllocateNode::KlassNode); 1.10 + const TypeKlassPtr* tklass = _igvn.type(klass)->is_klassptr(); 1.11 + log->head("eliminate_allocation type='%d'", 1.12 + log->identify(tklass->klass())); 1.13 + JVMState* p = alloc->jvms(); 1.14 + while (p != NULL) { 1.15 + log->elem("jvms bci='%d' method='%d'", p->bci(), log->identify(p->method())); 1.16 + p = p->caller(); 1.17 + } 1.18 + log->tail("eliminate_allocation"); 1.19 + } 1.20 + 1.21 process_users_of_allocation(alloc); 1.22 1.23 #ifndef PRODUCT 1.24 -if (PrintEliminateAllocations) { 1.25 - if (alloc->is_AllocateArray()) 1.26 - tty->print_cr("++++ Eliminated: %d AllocateArray", alloc->_idx); 1.27 - else 1.28 - tty->print_cr("++++ Eliminated: %d Allocate", alloc->_idx); 1.29 -} 1.30 + if (PrintEliminateAllocations) { 1.31 + if (alloc->is_AllocateArray()) 1.32 + tty->print_cr("++++ Eliminated: %d AllocateArray", alloc->_idx); 1.33 + else 1.34 + tty->print_cr("++++ Eliminated: %d Allocate", alloc->_idx); 1.35 + } 1.36 #endif 1.37 1.38 return true; 1.39 @@ -1639,6 +1653,18 @@ 1.40 } // if (!oldbox->is_eliminated()) 1.41 } // if (alock->is_Lock() && !lock->is_coarsened()) 1.42 1.43 + CompileLog* log = C->log(); 1.44 + if (log != NULL) { 1.45 + log->head("eliminate_lock lock='%d'", 1.46 + alock->is_Lock()); 1.47 + JVMState* p = alock->jvms(); 1.48 + while (p != NULL) { 1.49 + log->elem("jvms bci='%d' method='%d'", p->bci(), log->identify(p->method())); 1.50 + p = p->caller(); 1.51 + } 1.52 + log->tail("eliminate_lock"); 1.53 + } 1.54 + 1.55 #ifndef PRODUCT 1.56 if (PrintEliminateLocks) { 1.57 if (alock->is_Lock()) {