hotspot/src/share/vm/interpreter/invocationCounter.cpp
changeset 46727 6e4a84748e2c
parent 46630 75aa3e39d02c
equal deleted inserted replaced
46726:7801367e3cc9 46727:6e4a84748e2c
   102       return NULL;
   102       return NULL;
   103   }
   103   }
   104 }
   104 }
   105 
   105 
   106 
   106 
   107 static address do_nothing(methodHandle method, TRAPS) {
   107 static address do_nothing(const methodHandle& method, TRAPS) {
   108   // dummy action for inactive invocation counters
   108   // dummy action for inactive invocation counters
   109   MethodCounters* mcs = method->method_counters();
   109   MethodCounters* mcs = method->method_counters();
   110   assert(mcs != NULL, "");
   110   assert(mcs != NULL, "");
   111   mcs->invocation_counter()->set_carry();
   111   mcs->invocation_counter()->set_carry();
   112   mcs->invocation_counter()->set_state(InvocationCounter::wait_for_nothing);
   112   mcs->invocation_counter()->set_state(InvocationCounter::wait_for_nothing);
   113   return NULL;
   113   return NULL;
   114 }
   114 }
   115 
   115 
   116 
   116 
   117 static address do_decay(methodHandle method, TRAPS) {
   117 static address do_decay(const methodHandle& method, TRAPS) {
   118   // decay invocation counters so compilation gets delayed
   118   // decay invocation counters so compilation gets delayed
   119   MethodCounters* mcs = method->method_counters();
   119   MethodCounters* mcs = method->method_counters();
   120   assert(mcs != NULL, "");
   120   assert(mcs != NULL, "");
   121   mcs->invocation_counter()->decay();
   121   mcs->invocation_counter()->decay();
   122   return NULL;
   122   return NULL;
   128   assert(0 <= init  && init  < count_limit, "initial value out of range");
   128   assert(0 <= init  && init  < count_limit, "initial value out of range");
   129   _init  [state] = init;
   129   _init  [state] = init;
   130   _action[state] = action;
   130   _action[state] = action;
   131 }
   131 }
   132 
   132 
   133 address dummy_invocation_counter_overflow(methodHandle m, TRAPS) {
   133 address dummy_invocation_counter_overflow(const methodHandle& m, TRAPS) {
   134   ShouldNotReachHere();
   134   ShouldNotReachHere();
   135   return NULL;
   135   return NULL;
   136 }
   136 }
   137 
   137 
   138 void InvocationCounter::reinitialize(bool delay_overflow) {
   138 void InvocationCounter::reinitialize(bool delay_overflow) {