changeset 4627:7d928ba6f3f2

Merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 17 Feb 2012 12:37:29 +0100
parents ee91624e54e6 ad0440b099ff
children d882b9baea6e
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java
diffstat 4 files changed, 27 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java	Fri Feb 17 12:37:17 2012 +0100
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java	Fri Feb 17 12:37:29 2012 +0100
@@ -44,7 +44,7 @@
     public static boolean CacheGraphs                        = ____;
     public static boolean InlineMonomorphicCalls             = true;
     public static boolean InlinePolymorphicCalls             = true;
-    public static boolean InlineMegamorphicCalls             = true;
+    public static boolean InlineMegamorphicCalls             = ____;
     public static int     InliningPolicy                     = 4;
     public static int     WeightComputationPolicy            = 2;
     public static int     MaximumTrivialSize                 = 6;
@@ -52,15 +52,16 @@
     public static int     MaximumDesiredSize                 = 6000;
     public static int     MaximumRecursiveInlining           = 1;
     public static int     SmallCompiledCodeSize              = 1500;
+    public static boolean LimitInlinedProbability            = ____;
     // WeightBasedInliningPolicy (0)
     public static boolean ParseBeforeInlining                = ____;
     public static float   InliningSizePenaltyExp             = 20;
     public static float   MaximumInlineWeight                = 1.25f;
     public static float   InliningSizePenalty                = 1;
     // StaticSizeBasedInliningPolicy (1), MinimumCodeSizeBasedInlining (2),
-    // DynamicSizeBasedInliningPolicy (3), GreedySizeBasedInlining (3)
+    // DynamicSizeBasedInliningPolicy (3), GreedySizeBasedInlining (4)
     public static int     MaximumInlineSize                  = 35;
-    public static float   NestedInliningSizeRatio            = 0.9f;
+    public static float   NestedInliningSizeRatio            = 1f;
     public static float   BoostInliningForEscapeAnalysis     = 2f;
     public static int     MaximumGreedyInlineSize            = 250;
     public static float   ProbabilityCapForInlining          = 1f;
@@ -72,7 +73,7 @@
 
     // absolute probability analysis
     public static boolean ProbabilityAnalysis                = true;
-    public static boolean PropagateLoopFrequency             = true;
+    public static boolean PropagateLoopFrequency             = ____;
 
     // profiling information
     public static int     MatureExecutionsBranch             = 50;
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java	Fri Feb 17 12:37:17 2012 +0100
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java	Fri Feb 17 12:37:29 2012 +0100
@@ -815,7 +815,11 @@
             if (GraalOptions.ProbabilityAnalysis) {
                 if (node instanceof FixedNode) {
                     FixedNode fixed = (FixedNode) node;
-                    fixed.setProbability(fixed.probability() * invokeProbability);
+                    double newProbability = fixed.probability() * invokeProbability;
+                    if (GraalOptions.LimitInlinedProbability) {
+                        newProbability = Math.min(newProbability, invokeProbability);
+                    }
+                    fixed.setProbability(newProbability);
                 }
             }
             if (node instanceof FrameState) {
@@ -829,7 +833,6 @@
                     frameState.replaceAndDelete(stateAfter);
                 } else if (frameState.bci == FrameState.AFTER_EXCEPTION_BCI) {
                     if (frameState.isAlive()) {
-                        // TODO (ch) it happens sometimes that we have a FrameState.AFTER_EXCEPTION_BCI but no stateAtExceptionEdge
                         assert stateAtExceptionEdge != null;
                         frameState.replaceAndDelete(stateAtExceptionEdge);
                     } else {
--- a/mx/commands.py	Fri Feb 17 12:37:17 2012 +0100
+++ b/mx/commands.py	Fri Feb 17 12:37:29 2012 +0100
@@ -612,12 +612,17 @@
             mx.abort(codeOrMessage)
             return self
              
+    parser = ArgumentParser(prog='mx gate');
+    parser.add_argument('--omit-native-build', action='store_false', dest='buildNative', help='omit cleaning and building native code')
+
+    args = parser.parse_args(args)
+
     tasks = []             
     total = Task('Gate')
     try:
         
         t = Task('Clean')
-        clean([])
+        clean([] if args.buildNative else ['--no-native'])
         tasks.append(t.stop())
         
         t = Task('Checkstyle')
@@ -640,17 +645,19 @@
         tasks.append(t.stop())
 
         # Prevent Graal modifications from breaking the standard builds
-        t = Task('BuildHotSpotVarieties')
-        buildvms(['--vms', 'client,server', '--builds', 'fastdebug,product'])
-        tasks.append(t.stop())
+        if args.buildNative:
+            t = Task('BuildHotSpotVarieties')
+            buildvms(['--vms', 'client,server', '--builds', 'fastdebug,product'])
+            tasks.append(t.stop())
         
         for vmbuild in ['fastdebug', 'product']:
             global _vmbuild
             _vmbuild = vmbuild
             
-            t = Task('BuildHotSpotGraal:' + vmbuild)
-            buildvms(['--vms', 'graal', '--builds', vmbuild])
-            tasks.append(t.stop())
+            if args.buildNative:
+                t = Task('BuildHotSpotGraal:' + vmbuild)
+                buildvms(['--vms', 'graal', '--builds', vmbuild])
+                tasks.append(t.stop())
             
             t = Task('BootstrapWithSystemAssertions:' + vmbuild)
             vm(['-esa', '-version'])
@@ -795,7 +802,7 @@
     _vmbuild = 'product'
     commands = {
         'build': [build, '[-options]'],
-        'buildvms': [buildvms, ''],
+        'buildvms': [buildvms, '[-options]'],
         'clean': [clean, ''],
         'copyrightcheck': [copyrightcheck, ''],
         'hsdis': [hsdis, '[att]'],
@@ -803,7 +810,7 @@
         'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'],
         'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'],
         'example': [example, '[-v] example names...'],
-        'gate' : [gate, ''],
+        'gate' : [gate, '[-options]'],
         'gv' : [gv, ''],
         'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'],
         'unittest' : [unittest, '[filters...]'],
--- a/src/share/vm/graal/graalEnv.cpp	Fri Feb 17 12:37:17 2012 +0100
+++ b/src/share/vm/graal/graalEnv.cpp	Fri Feb 17 12:37:29 2012 +0100
@@ -246,7 +246,7 @@
                                         int index) {
   EXCEPTION_CONTEXT;
 
-  assert(klass->is_linked(), "must be linked before using its constan-pool");
+  assert(klass->is_linked(), "must be linked before using its constant-pool");
 
   constantPoolHandle cpool(thread, klass->constants());