1.1 --- a/src/share/vm/oops/method.hpp Fri Sep 12 01:04:04 2014 +0000 1.2 +++ b/src/share/vm/oops/method.hpp Tue Mar 11 15:06:34 2014 +0400 1.3 @@ -233,10 +233,11 @@ 1.4 // Tracking number of breakpoints, for fullspeed debugging. 1.5 // Only mutated by VM thread. 1.6 u2 number_of_breakpoints() const { 1.7 - if (method_counters() == NULL) { 1.8 + MethodCounters* mcs = method_counters(); 1.9 + if (mcs == NULL) { 1.10 return 0; 1.11 } else { 1.12 - return method_counters()->number_of_breakpoints(); 1.13 + return mcs->number_of_breakpoints(); 1.14 } 1.15 } 1.16 void incr_number_of_breakpoints(TRAPS) { 1.17 @@ -253,8 +254,9 @@ 1.18 } 1.19 // Initialization only 1.20 void clear_number_of_breakpoints() { 1.21 - if (method_counters() != NULL) { 1.22 - method_counters()->clear_number_of_breakpoints(); 1.23 + MethodCounters* mcs = method_counters(); 1.24 + if (mcs != NULL) { 1.25 + mcs->clear_number_of_breakpoints(); 1.26 } 1.27 } 1.28 1.29 @@ -301,10 +303,11 @@ 1.30 } 1.31 1.32 int interpreter_throwout_count() const { 1.33 - if (method_counters() == NULL) { 1.34 + MethodCounters* mcs = method_counters(); 1.35 + if (mcs == NULL) { 1.36 return 0; 1.37 } else { 1.38 - return method_counters()->interpreter_throwout_count(); 1.39 + return mcs->interpreter_throwout_count(); 1.40 } 1.41 } 1.42 1.43 @@ -379,26 +382,28 @@ 1.44 return method_counters()->interpreter_invocation_count(); 1.45 } 1.46 } 1.47 - void set_prev_event_count(int count, TRAPS) { 1.48 - MethodCounters* mcs = get_method_counters(CHECK); 1.49 + void set_prev_event_count(int count) { 1.50 + MethodCounters* mcs = method_counters(); 1.51 if (mcs != NULL) { 1.52 mcs->set_interpreter_invocation_count(count); 1.53 } 1.54 } 1.55 jlong prev_time() const { 1.56 - return method_counters() == NULL ? 0 : method_counters()->prev_time(); 1.57 + MethodCounters* mcs = method_counters(); 1.58 + return mcs == NULL ? 0 : mcs->prev_time(); 1.59 } 1.60 - void set_prev_time(jlong time, TRAPS) { 1.61 - MethodCounters* mcs = get_method_counters(CHECK); 1.62 + void set_prev_time(jlong time) { 1.63 + MethodCounters* mcs = method_counters(); 1.64 if (mcs != NULL) { 1.65 mcs->set_prev_time(time); 1.66 } 1.67 } 1.68 float rate() const { 1.69 - return method_counters() == NULL ? 0 : method_counters()->rate(); 1.70 + MethodCounters* mcs = method_counters(); 1.71 + return mcs == NULL ? 0 : mcs->rate(); 1.72 } 1.73 - void set_rate(float rate, TRAPS) { 1.74 - MethodCounters* mcs = get_method_counters(CHECK); 1.75 + void set_rate(float rate) { 1.76 + MethodCounters* mcs = method_counters(); 1.77 if (mcs != NULL) { 1.78 mcs->set_rate(rate); 1.79 } 1.80 @@ -416,9 +421,12 @@ 1.81 static MethodCounters* build_method_counters(Method* m, TRAPS); 1.82 1.83 int interpreter_invocation_count() { 1.84 - if (TieredCompilation) return invocation_count(); 1.85 - else return (method_counters() == NULL) ? 0 : 1.86 - method_counters()->interpreter_invocation_count(); 1.87 + if (TieredCompilation) { 1.88 + return invocation_count(); 1.89 + } else { 1.90 + MethodCounters* mcs = method_counters(); 1.91 + return (mcs == NULL) ? 0 : mcs->interpreter_invocation_count(); 1.92 + } 1.93 } 1.94 int increment_interpreter_invocation_count(TRAPS) { 1.95 if (TieredCompilation) ShouldNotReachHere();