Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/advancedThresholdPolicy.cpp @ 16107:c7db9dc73694
disabled dialing C1 compilation back to partial profiling when Graal is the top tier compiler
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 13 Jun 2014 18:42:33 +0200 |
parents | 4ca6dc0799b6 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
16106:5d84706642ce | 16107:c7db9dc73694 |
---|---|
343 case CompLevel_none: | 343 case CompLevel_none: |
344 // If we were at full profile level, would we switch to full opt? | 344 // If we were at full profile level, would we switch to full opt? |
345 if (common(p, method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) { | 345 if (common(p, method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) { |
346 next_level = CompLevel_full_optimization; | 346 next_level = CompLevel_full_optimization; |
347 } else if ((this->*p)(i, b, cur_level)) { | 347 } else if ((this->*p)(i, b, cur_level)) { |
348 #ifdef COMPILERGRAAL | |
349 // Since Graal takes a while to warm up, its queue inevitably backs up during | |
350 // early VM execution. As of 2014-06-13, Graal's inliner assumes that the root | |
351 // compilation method and all potential inlinees have mature profiles (which | |
352 // includes type profiling). If it sees immature profiles, Graal's inliner | |
353 // can perform pathologically bad (e.g., causing OutOfMemoryErrors due to | |
354 // exploring/inlining too many graphs). Since a rewrite of the inliner is | |
355 // in progress, we simply disable the dialing back heuristic for now and will | |
356 // revisit this decision once the new inliner is completed. | |
357 next_level = CompLevel_full_profile; | |
358 #else | |
348 // C1-generated fully profiled code is about 30% slower than the limited profile | 359 // C1-generated fully profiled code is about 30% slower than the limited profile |
349 // code that has only invocation and backedge counters. The observation is that | 360 // code that has only invocation and backedge counters. The observation is that |
350 // if C2 queue is large enough we can spend too much time in the fully profiled code | 361 // if C2 queue is large enough we can spend too much time in the fully profiled code |
351 // while waiting for C2 to pick the method from the queue. To alleviate this problem | 362 // while waiting for C2 to pick the method from the queue. To alleviate this problem |
352 // we introduce a feedback on the C2 queue size. If the C2 queue is sufficiently long | 363 // we introduce a feedback on the C2 queue size. If the C2 queue is sufficiently long |
356 Tier3DelayOn * compiler_count(CompLevel_full_optimization)) { | 367 Tier3DelayOn * compiler_count(CompLevel_full_optimization)) { |
357 next_level = CompLevel_limited_profile; | 368 next_level = CompLevel_limited_profile; |
358 } else { | 369 } else { |
359 next_level = CompLevel_full_profile; | 370 next_level = CompLevel_full_profile; |
360 } | 371 } |
372 #endif | |
361 } | 373 } |
362 break; | 374 break; |
363 case CompLevel_limited_profile: | 375 case CompLevel_limited_profile: |
364 if (is_method_profiled(method)) { | 376 if (is_method_profiled(method)) { |
365 // Special case: we got here because this method was fully profiled in the interpreter. | 377 // Special case: we got here because this method was fully profiled in the interpreter. |