< prev index next >

src/share/vm/oops/methodCounters.hpp

Print this page




 101       // counter, therefore no shifting of bits is required.
 102       _interpreter_backward_branch_limit = (compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100;
 103     } else {
 104       _interpreter_backward_branch_limit = ((compile_threshold * OnStackReplacePercentage) / 100) << InvocationCounter::count_shift;
 105     }
 106     _interpreter_profile_limit = ((compile_threshold * InterpreterProfilePercentage) / 100) << InvocationCounter::count_shift;
 107     _invoke_mask = right_n_bits(Arguments::scaled_freq_log(Tier0InvokeNotifyFreqLog, scale)) << InvocationCounter::count_shift;
 108     _backedge_mask = right_n_bits(Arguments::scaled_freq_log(Tier0BackedgeNotifyFreqLog, scale)) << InvocationCounter::count_shift;
 109   }
 110 
 111  public:
 112   virtual bool is_methodCounters() const volatile { return true; }
 113 
 114   static MethodCounters* allocate(methodHandle mh, TRAPS);
 115 
 116   void deallocate_contents(ClassLoaderData* loader_data) {}
 117 
 118   AOT_ONLY(Method* method() const { return _method; })
 119 
 120   static int size() {
 121     return align_size_up((int)sizeof(MethodCounters), wordSize) / wordSize;
 122   }
 123 
 124   void clear_counters();
 125 
 126 #if defined(COMPILER2) || INCLUDE_JVMCI
 127 
 128   int interpreter_invocation_count() {
 129     return _interpreter_invocation_count;
 130   }
 131   void set_interpreter_invocation_count(int count) {
 132     _interpreter_invocation_count = count;
 133   }
 134   int increment_interpreter_invocation_count() {
 135     return ++_interpreter_invocation_count;
 136   }
 137 
 138   void interpreter_throwout_increment() {
 139     if (_interpreter_throwout_count < 65534) {
 140       _interpreter_throwout_count++;
 141     }




 101       // counter, therefore no shifting of bits is required.
 102       _interpreter_backward_branch_limit = (compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100;
 103     } else {
 104       _interpreter_backward_branch_limit = ((compile_threshold * OnStackReplacePercentage) / 100) << InvocationCounter::count_shift;
 105     }
 106     _interpreter_profile_limit = ((compile_threshold * InterpreterProfilePercentage) / 100) << InvocationCounter::count_shift;
 107     _invoke_mask = right_n_bits(Arguments::scaled_freq_log(Tier0InvokeNotifyFreqLog, scale)) << InvocationCounter::count_shift;
 108     _backedge_mask = right_n_bits(Arguments::scaled_freq_log(Tier0BackedgeNotifyFreqLog, scale)) << InvocationCounter::count_shift;
 109   }
 110 
 111  public:
 112   virtual bool is_methodCounters() const volatile { return true; }
 113 
 114   static MethodCounters* allocate(methodHandle mh, TRAPS);
 115 
 116   void deallocate_contents(ClassLoaderData* loader_data) {}
 117 
 118   AOT_ONLY(Method* method() const { return _method; })
 119 
 120   static int size() {
 121     return align_up((int)sizeof(MethodCounters), wordSize) / wordSize;
 122   }
 123 
 124   void clear_counters();
 125 
 126 #if defined(COMPILER2) || INCLUDE_JVMCI
 127 
 128   int interpreter_invocation_count() {
 129     return _interpreter_invocation_count;
 130   }
 131   void set_interpreter_invocation_count(int count) {
 132     _interpreter_invocation_count = count;
 133   }
 134   int increment_interpreter_invocation_count() {
 135     return ++_interpreter_invocation_count;
 136   }
 137 
 138   void interpreter_throwout_increment() {
 139     if (_interpreter_throwout_count < 65534) {
 140       _interpreter_throwout_count++;
 141     }


< prev index next >