Mercurial > hg > graal-compiler
comparison src/share/vm/oops/method.hpp @ 20489:966205f0e717
8058564: Tiered compilation performance drop in PIT
Summary: Ensure MethodCounters are created before method is enqueued for compilation
Reviewed-by: kvn, drchase, jiangli, roland
author | iveresov |
---|---|
date | Fri, 19 Sep 2014 11:53:58 -0700 |
parents | 7301840ea20e |
children | 3c87c13918fb |
comparison
equal
deleted
inserted
replaced
20488:9c8439756c05 | 20489:966205f0e717 |
---|---|
363 | 363 |
364 MethodCounters* method_counters() const { | 364 MethodCounters* method_counters() const { |
365 return _method_counters; | 365 return _method_counters; |
366 } | 366 } |
367 | 367 |
368 void set_method_counters(MethodCounters* counters) { | 368 void clear_method_counters() { |
369 // The store into method must be released. On platforms without | 369 _method_counters = NULL; |
370 // total store order (TSO) the reference may become visible before | 370 } |
371 // the initialization of data otherwise. | 371 |
372 OrderAccess::release_store_ptr((volatile void *)&_method_counters, counters); | 372 bool init_method_counters(MethodCounters* counters) { |
373 // Try to install a pointer to MethodCounters, return true on success. | |
374 return Atomic::cmpxchg_ptr(counters, (volatile void*)&_method_counters, NULL) == NULL; | |
373 } | 375 } |
374 | 376 |
375 #ifdef TIERED | 377 #ifdef TIERED |
376 // We are reusing interpreter_invocation_count as a holder for the previous event count! | 378 // We are reusing interpreter_invocation_count as a holder for the previous event count! |
377 // We can do that since interpreter_invocation_count is not used in tiered. | 379 // We can do that since interpreter_invocation_count is not used in tiered. |