RFR (S) 8041959: Skip replay parsing errors with ReplayIgnoreInitErrors
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Apr 25 22:06:33 UTC 2014
http://cr.openjdk.java.net/~kvn/8041959/webrev
https://bugs.openjdk.java.net/browse/JDK-8041959
Compilation replay currently can't resolve dynamically generated classes
recorded in replay file. There are other parsing problems too which does
not affect replayed compilation. Replay is aborted (not even reaching
compilation) if such problems are found.
We should allow to try the compilation even if such problems are found
because the compilation may not need that broken information.
I am suggesting to do that when already existing flag is specified:
-XX:+ReplayIgnoreInitErrors
Currently with this flag we only skip problems during compiled method's
klasses initialization which happen very rare.
I also took small fix from Roland in process_ciMethodData().
When failed compilation happened with Tiered we have to replay with
TieredCompilation because MDO counters generated by C1 are slightly
different:
if (TieredCompilation && ProfileInterpreter) {
// Interpreter and C1 treat final and special invokes differently.
// C1 will record a type, whereas the interpreter will just
// increment the count. Detect this case.
if (morphism == 1 && count > 0) {
epsilon = count;
count = 0;
}
}
Unfortunately with -XX:+TieredCompilation a lot of other C1 compilations
are triggered (static initializers) during replay.
Added missing check in SimpleThresholdPolicy::event() to avoid that.
Note, we already have such check in NonTieredCompPolicy::event().
With these changes I was able to replay 8039298 compilation failure
without modifying replay file manually.
Thanks,
Vladimir
More information about the hotspot-compiler-dev
mailing list