# HG changeset patch # User Christian Haeubl # Date 1371127652 -7200 # Node ID 0c717bcb298841883f30d85b4f0a2ea0cb204120 # Parent b2934877ba617882e29d72a2f887bbd0e4fa1c6f# Parent 4ebe31e19892c42af2ce87d3d344f9a297c11227 Merge. diff -r 4ebe31e19892 -r 0c717bcb2988 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeInliningRelevanceClosure.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeInliningRelevanceClosure.java Thu Jun 13 11:25:46 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeInliningRelevanceClosure.java Thu Jun 13 14:47:32 2013 +0200 @@ -55,14 +55,14 @@ public ComputeInliningRelevanceIterator(StructuredGraph graph) { super(graph); - this.scopes = computeLowestPathProbabilities(); + this.scopes = computeScopesAndProbabilities(); } @Override protected void initializeScope() { Scope scope = scopes.get(currentScopeStart); parentRelevance = getParentScopeRelevance(scope); - currentProbability = scope.minPathProbability; + currentProbability = scope.probability; } private double getParentScopeRelevance(Scope scope) { @@ -72,7 +72,7 @@ for (AbstractEndNode end : ((LoopBeginNode) scope.start).forwardEnds()) { parentProbability += nodeProbabilities.get(end); } - return parentProbability / scope.parent.minPathProbability; + return parentProbability / scope.parent.probability; } else { assert scope.parent == null; return 1.0; @@ -89,11 +89,11 @@ assert !Double.isNaN(relevance); } - private HashMap computeLowestPathProbabilities() { + private HashMap computeScopesAndProbabilities() { HashMap result = new HashMap<>(); for (Scope scope : computeScopes()) { - scope.minPathProbability = Math.max(EPSILON, nodeProbabilities.get(scope.start)); + scope.probability = Math.max(EPSILON, nodeProbabilities.get(scope.start)); result.put(scope.start, scope); } @@ -132,7 +132,7 @@ public final FixedNode start; public final Scope parent; - public double minPathProbability; + public double probability; public Scope(FixedNode start, Scope parent) { this.start = start; diff -r 4ebe31e19892 -r 0c717bcb2988 src/share/vm/runtime/compilationPolicy.cpp --- a/src/share/vm/runtime/compilationPolicy.cpp Thu Jun 13 11:25:46 2013 +0200 +++ b/src/share/vm/runtime/compilationPolicy.cpp Thu Jun 13 14:47:32 2013 +0200 @@ -422,6 +422,11 @@ if (is_compilation_enabled() && can_be_compiled(m)) { nmethod* nm = m->code(); +#ifdef GRAALVM + if (m->queued_for_compilation()) { + delay_compilation(m()); + } else +#endif if (nm == NULL ) { CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, comment, thread); } diff -r 4ebe31e19892 -r 0c717bcb2988 src/share/vm/runtime/globals.hpp