|
27 | 27 |
|
28 | 28 | #include "code/compressedStream.hpp"
|
29 | 29 | #include "compiler/compilerDefinitions.hpp"
|
30 |
| -#include "interpreter/invocationCounter.hpp" |
31 | 30 | #include "oops/annotations.hpp"
|
32 | 31 | #include "oops/constantPool.hpp"
|
33 |
| -#include "oops/methodCounters.hpp" |
34 | 32 | #include "oops/methodFlags.hpp"
|
35 | 33 | #include "oops/instanceKlass.hpp"
|
36 | 34 | #include "oops/oop.hpp"
|
@@ -216,33 +214,11 @@ class Method : public Metadata {
|
216 | 214 | void clear_all_breakpoints();
|
217 | 215 | // Tracking number of breakpoints, for fullspeed debugging.
|
218 | 216 | // Only mutated by VM thread.
|
219 |
| - u2 number_of_breakpoints() const { |
220 |
| - MethodCounters* mcs = method_counters(); |
221 |
| - if (mcs == nullptr) { |
222 |
| - return 0; |
223 |
| - } else { |
224 |
| - return mcs->number_of_breakpoints(); |
225 |
| - } |
226 |
| - } |
227 |
| - void incr_number_of_breakpoints(Thread* current) { |
228 |
| - MethodCounters* mcs = get_method_counters(current); |
229 |
| - if (mcs != nullptr) { |
230 |
| - mcs->incr_number_of_breakpoints(); |
231 |
| - } |
232 |
| - } |
233 |
| - void decr_number_of_breakpoints(Thread* current) { |
234 |
| - MethodCounters* mcs = get_method_counters(current); |
235 |
| - if (mcs != nullptr) { |
236 |
| - mcs->decr_number_of_breakpoints(); |
237 |
| - } |
238 |
| - } |
| 217 | + inline u2 number_of_breakpoints() const; |
| 218 | + inline void incr_number_of_breakpoints(Thread* current); |
| 219 | + inline void decr_number_of_breakpoints(Thread* current); |
239 | 220 | // Initialization only
|
240 |
| - void clear_number_of_breakpoints() { |
241 |
| - MethodCounters* mcs = method_counters(); |
242 |
| - if (mcs != nullptr) { |
243 |
| - mcs->clear_number_of_breakpoints(); |
244 |
| - } |
245 |
| - } |
| 221 | + inline void clear_number_of_breakpoints(); |
246 | 222 | #endif // !INCLUDE_JVMTI
|
247 | 223 |
|
248 | 224 | // index into InstanceKlass methods() array
|
@@ -280,22 +256,10 @@ class Method : public Metadata {
|
280 | 256 |
|
281 | 257 | #if COMPILER2_OR_JVMCI
|
282 | 258 | // Count of times method was exited via exception while interpreting
|
283 |
| - void interpreter_throwout_increment(Thread* current) { |
284 |
| - MethodCounters* mcs = get_method_counters(current); |
285 |
| - if (mcs != nullptr) { |
286 |
| - mcs->interpreter_throwout_increment(); |
287 |
| - } |
288 |
| - } |
| 259 | + inline void interpreter_throwout_increment(Thread* current); |
289 | 260 | #endif
|
290 | 261 |
|
291 |
| - int interpreter_throwout_count() const { |
292 |
| - MethodCounters* mcs = method_counters(); |
293 |
| - if (mcs == nullptr) { |
294 |
| - return 0; |
295 |
| - } else { |
296 |
| - return mcs->interpreter_throwout_count(); |
297 |
| - } |
298 |
| - } |
| 262 | + inline int interpreter_throwout_count() const; |
299 | 263 |
|
300 | 264 | u2 size_of_parameters() const { return constMethod()->size_of_parameters(); }
|
301 | 265 |
|
@@ -356,36 +320,12 @@ class Method : public Metadata {
|
356 | 320 |
|
357 | 321 | bool init_method_counters(MethodCounters* counters);
|
358 | 322 |
|
359 |
| - int prev_event_count() const { |
360 |
| - MethodCounters* mcs = method_counters(); |
361 |
| - return mcs == nullptr ? 0 : mcs->prev_event_count(); |
362 |
| - } |
363 |
| - void set_prev_event_count(int count) { |
364 |
| - MethodCounters* mcs = method_counters(); |
365 |
| - if (mcs != nullptr) { |
366 |
| - mcs->set_prev_event_count(count); |
367 |
| - } |
368 |
| - } |
369 |
| - jlong prev_time() const { |
370 |
| - MethodCounters* mcs = method_counters(); |
371 |
| - return mcs == nullptr ? 0 : mcs->prev_time(); |
372 |
| - } |
373 |
| - void set_prev_time(jlong time) { |
374 |
| - MethodCounters* mcs = method_counters(); |
375 |
| - if (mcs != nullptr) { |
376 |
| - mcs->set_prev_time(time); |
377 |
| - } |
378 |
| - } |
379 |
| - float rate() const { |
380 |
| - MethodCounters* mcs = method_counters(); |
381 |
| - return mcs == nullptr ? 0 : mcs->rate(); |
382 |
| - } |
383 |
| - void set_rate(float rate) { |
384 |
| - MethodCounters* mcs = method_counters(); |
385 |
| - if (mcs != nullptr) { |
386 |
| - mcs->set_rate(rate); |
387 |
| - } |
388 |
| - } |
| 323 | + inline int prev_event_count() const; |
| 324 | + inline void set_prev_event_count(int count); |
| 325 | + inline jlong prev_time() const; |
| 326 | + inline void set_prev_time(jlong time); |
| 327 | + inline float rate() const; |
| 328 | + inline void set_rate(float rate); |
389 | 329 |
|
390 | 330 | int invocation_count() const;
|
391 | 331 | int backedge_count() const;
|
|
0 commit comments