1.1 --- a/src/share/vm/opto/graphKit.cpp Tue Jun 15 15:57:36 2010 -0700 1.2 +++ b/src/share/vm/opto/graphKit.cpp Tue Jun 15 18:07:27 2010 -0700 1.3 @@ -1789,9 +1789,10 @@ 1.4 1.5 void GraphKit::increment_counter(Node* counter_addr) { 1.6 int adr_type = Compile::AliasIdxRaw; 1.7 - Node* cnt = make_load(NULL, counter_addr, TypeInt::INT, T_INT, adr_type); 1.8 + Node* ctrl = control(); 1.9 + Node* cnt = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type); 1.10 Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1))); 1.11 - store_to_memory( NULL, counter_addr, incr, T_INT, adr_type ); 1.12 + store_to_memory( ctrl, counter_addr, incr, T_INT, adr_type ); 1.13 } 1.14 1.15 1.16 @@ -2771,11 +2772,7 @@ 1.17 // Update the counter for this lock. Don't bother using an atomic 1.18 // operation since we don't require absolute accuracy. 1.19 lock->create_lock_counter(map()->jvms()); 1.20 - int adr_type = Compile::AliasIdxRaw; 1.21 - Node* counter_addr = makecon(TypeRawPtr::make(lock->counter()->addr())); 1.22 - Node* cnt = make_load(NULL, counter_addr, TypeInt::INT, T_INT, adr_type); 1.23 - Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1))); 1.24 - store_to_memory(control(), counter_addr, incr, T_INT, adr_type); 1.25 + increment_counter(lock->counter()->addr()); 1.26 } 1.27 #endif 1.28