Mercurial > hg > truffle
diff src/share/vm/runtime/compilationPolicy.cpp @ 6988:2cb439954abf
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 19 Nov 2012 15:36:13 +0100 |
parents | e522a00b91aa bd7a7ce2e264 |
children | 7d815d842ee0 |
line wrap: on
line diff
--- a/src/share/vm/runtime/compilationPolicy.cpp Sun Nov 18 22:45:43 2012 +0100 +++ b/src/share/vm/runtime/compilationPolicy.cpp Mon Nov 19 15:36:13 2012 +0100 @@ -104,6 +104,9 @@ // 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; @@ -330,6 +333,16 @@ 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