hotspot/src/share/vm/interpreter/invocationCounter.cpp
changeset 17000 11bf92e571a2
parent 7397 5b173b4ca846
child 46630 75aa3e39d02c
equal deleted inserted replaced
16665:482e60f4f893 17000:11bf92e571a2
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   102 }
   102 }
   103 
   103 
   104 
   104 
   105 static address do_nothing(methodHandle method, TRAPS) {
   105 static address do_nothing(methodHandle method, TRAPS) {
   106   // dummy action for inactive invocation counters
   106   // dummy action for inactive invocation counters
   107   method->invocation_counter()->set_carry();
   107   MethodCounters* mcs = method->method_counters();
   108   method->invocation_counter()->set_state(InvocationCounter::wait_for_nothing);
   108   assert(mcs != NULL, "");
       
   109   mcs->invocation_counter()->set_carry();
       
   110   mcs->invocation_counter()->set_state(InvocationCounter::wait_for_nothing);
   109   return NULL;
   111   return NULL;
   110 }
   112 }
   111 
   113 
   112 
   114 
   113 static address do_decay(methodHandle method, TRAPS) {
   115 static address do_decay(methodHandle method, TRAPS) {
   114   // decay invocation counters so compilation gets delayed
   116   // decay invocation counters so compilation gets delayed
   115   method->invocation_counter()->decay();
   117   MethodCounters* mcs = method->method_counters();
       
   118   assert(mcs != NULL, "");
       
   119   mcs->invocation_counter()->decay();
   116   return NULL;
   120   return NULL;
   117 }
   121 }
   118 
   122 
   119 
   123 
   120 void InvocationCounter::def(State state, int init, Action action) {
   124 void InvocationCounter::def(State state, int init, Action action) {