mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +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
|
@ -616,12 +616,7 @@ void NMethodSweeper::possibly_flush(nmethod* nm) {
|
|||
// The stack-scanning low-cost detection may not see the method was used (which can happen for
|
||||
// flat profiles). Check the age counter for possible data.
|
||||
if (UseCodeAging && make_not_entrant && (nm->is_compiled_by_c2() || nm->is_compiled_by_c1())) {
|
||||
MethodCounters* mc = nm->method()->method_counters();
|
||||
if (mc == NULL) {
|
||||
// Sometimes we can get here without MethodCounters. For example if we run with -Xcomp.
|
||||
// Try to allocate them.
|
||||
mc = nm->method()->get_method_counters(Thread::current());
|
||||
}
|
||||
MethodCounters* mc = nm->method()->get_method_counters(Thread::current());
|
||||
if (mc != NULL) {
|
||||
// Snapshot the value as it's changed concurrently
|
||||
int age = mc->nmethod_age();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue