diff options
author | minqi <none@none> | 2012-11-12 14:03:53 -0800 |
---|---|---|
committer | minqi <none@none> | 2012-11-12 14:03:53 -0800 |
commit | a0a063373b4bea636f530a6f1d8535108015c0f0 (patch) | |
tree | 771f25e40ff64de77f93c22b658957881cab87ea /src/share/vm/runtime/compilationPolicy.cpp | |
parent | f2147cb21125cde235827d0a9f9c340738cd807f (diff) |
6830717: replay of compilations would help with debugging
Summary: When java process crashed in compiler thread, repeat the compilation process will help finding root cause. This is done with using SA dump application class data and replay data from core dump, then use debug version of jvm to recompile the problematic java method.
Reviewed-by: kvn, twisti, sspitsyn
Contributed-by: yumin.qi@oracle.com
Diffstat (limited to 'src/share/vm/runtime/compilationPolicy.cpp')
-rw-r--r-- | src/share/vm/runtime/compilationPolicy.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/share/vm/runtime/compilationPolicy.cpp b/src/share/vm/runtime/compilationPolicy.cpp index 73b8f8393..713163a10 100644 --- a/src/share/vm/runtime/compilationPolicy.cpp +++ b/src/share/vm/runtime/compilationPolicy.cpp @@ -97,6 +97,9 @@ void CompilationPolicy::completed_vm_startup() { // This is intended to force compiles for methods (usually for // debugging) that would otherwise be interpreted for some reason. bool CompilationPolicy::must_be_compiled(methodHandle m, int comp_level) { + // Don't allow Xcomp to cause compiles in replay mode + if (ReplayCompiles) return false; + if (m->has_compiled_code()) return false; // already compiled if (!can_be_compiled(m, comp_level)) return false; @@ -322,6 +325,16 @@ nmethod* NonTieredCompPolicy::event(methodHandle method, methodHandle inlinee, i return NULL; } } + if (CompileTheWorld || ReplayCompiles) { + // Don't trigger other compiles in testing mode + if (bci == InvocationEntryBci) { + reset_counter_for_invocation_event(method); + } else { + reset_counter_for_back_branch_event(method); + } + return NULL; + } + if (bci == InvocationEntryBci) { // when code cache is full, compilation gets switched off, UseCompiler // is set to false |