mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8058564: Tiered compilation performance drop in PIT
Ensure MethodCounters are created before method is enqueued for compilation Reviewed-by: kvn, drchase, jiangli
This commit is contained in:
parent
964c442938
commit
ad7e67c98f
4 changed files with 18 additions and 17 deletions
|
@ -333,11 +333,13 @@ class Method : public Metadata {
|
|||
return _method_counters;
|
||||
}
|
||||
|
||||
void set_method_counters(MethodCounters* counters) {
|
||||
// The store into method must be released. On platforms without
|
||||
// total store order (TSO) the reference may become visible before
|
||||
// the initialization of data otherwise.
|
||||
OrderAccess::release_store_ptr((volatile void *)&_method_counters, counters);
|
||||
void clear_method_counters() {
|
||||
_method_counters = NULL;
|
||||
}
|
||||
|
||||
bool init_method_counters(MethodCounters* counters) {
|
||||
// Try to install a pointer to MethodCounters, return true on success.
|
||||
return Atomic::cmpxchg_ptr(counters, (volatile void*)&_method_counters, NULL) == NULL;
|
||||
}
|
||||
|
||||
#ifdef TIERED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue