changeset 20010:3819bcdde898

Merge
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Mon, 23 Mar 2015 10:27:17 -0700
parents 426e45c75771 (diff) 220c494e5088 (current diff)
children 30769a7dc619
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotInlineInvokePlugin.java src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/beginend.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/framestatelocks.filter
diffstat 3 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Assumptions.java	Mon Mar 23 16:11:48 2015 +0100
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Assumptions.java	Mon Mar 23 10:27:17 2015 -0700
@@ -57,7 +57,7 @@
 
         public AssumptionResult(T result, Assumption... assumptions) {
             this.result = result;
-            this.assumptions = assumptions.clone();
+            this.assumptions = assumptions;
         }
 
         public AssumptionResult(T result) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java	Mon Mar 23 16:11:48 2015 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java	Mon Mar 23 10:27:17 2015 -0700
@@ -75,8 +75,10 @@
                        "The format for each option is the same as on the command line just without the '-G:' prefix.", type = OptionType.Debug)
         public static final OptionValue<String> CompileTheWorldConfig = new OptionValue<>(null);
 
-        @Option(help = "Last class to consider when using -XX:+CompileTheWorld", type = OptionType.Debug)
+        @Option(help = "Run CTW using as many threads as there are processors on the system", type = OptionType.Debug)
         public static final OptionValue<Boolean> CompileTheWorldMultiThreaded = new OptionValue<>(false);
+        @Option(help = "Number of threads to use for multithreaded CTW.  Defaults to Runtime.getRuntime().availableProcessors()", type = OptionType.Debug)
+        public static final OptionValue<Integer> CompileTheWorldThreads = new OptionValue<>(0);
         // @formatter:on
 
         /**
@@ -240,8 +242,11 @@
                     return DebugEnvironment.initialize(System.out);
                 }
             });
-            int availableProcessors = Runtime.getRuntime().availableProcessors();
-            threadPool = new ThreadPoolExecutor(availableProcessors, availableProcessors, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), factory);
+            int threadCount = Options.CompileTheWorldThreads.getValue();
+            if (threadCount == 0) {
+                threadCount = Runtime.getRuntime().availableProcessors();
+            }
+            threadPool = new ThreadPoolExecutor(threadCount, threadCount, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), factory);
         }
 
         try (OverrideScope s = config.apply()) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectTypeImpl.java	Mon Mar 23 16:11:48 2015 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectTypeImpl.java	Mon Mar 23 10:27:17 2015 -0700
@@ -160,8 +160,9 @@
                 if (leafConcreteSubtype != null) {
                     assert !leafConcreteSubtype.getResult().equals(implementor);
                     AssumptionResult<ResolvedJavaType> newResult = new AssumptionResult<>(leafConcreteSubtype.getResult(), new ConcreteSubtype(this, implementor));
+                    // Accumulate leaf assumptions and return the combined result.
                     newResult.add(leafConcreteSubtype);
-                    return leafConcreteSubtype;
+                    return newResult;
                 }
                 return null;
             }