changeset 22647:350e41999d30

work around for Eclipse bug 477597
author Doug Simon <doug.simon@oracle.com>
date Wed, 16 Sep 2015 21:56:12 +0200
parents 05183a084a08
children 63643c4ef733
files graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/MemoryUsageBenchmark.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorldOptions.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippetsOptions.java graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParserOptions.java graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InlineDuringParsingPlugin.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java mx.graal/suite.py
diffstat 15 files changed, 246 insertions(+), 141 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/MemoryUsageBenchmark.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/MemoryUsageBenchmark.java	Wed Sep 16 21:56:12 2015 +0200
@@ -34,6 +34,7 @@
 import com.oracle.graal.debug.internal.DebugScope;
 import com.oracle.graal.hotspot.CompilationTask;
 import com.oracle.graal.hotspot.CompileTheWorld;
+import com.oracle.graal.hotspot.CompileTheWorldOptions;
 import com.oracle.graal.hotspot.HotSpotGraalCompiler;
 import com.oracle.graal.nodes.StructuredGraph.AllowAssumptions;
 
@@ -181,7 +182,7 @@
     public void run() {
         compileAndTime("simple");
         compileAndTime("complex");
-        if (CompileTheWorld.Options.CompileTheWorldClasspath.getValue() != CompileTheWorld.SUN_BOOT_CLASS_PATH) {
+        if (CompileTheWorldOptions.CompileTheWorldClasspath.getValue() != CompileTheWorld.SUN_BOOT_CLASS_PATH) {
             HotSpotJVMCIRuntimeProvider runtime = HotSpotJVMCIRuntime.runtime();
             CompileTheWorld ctw = new CompileTheWorld(runtime, (HotSpotGraalCompiler) runtime.getCompiler());
             try {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java	Wed Sep 16 21:56:12 2015 +0200
@@ -22,13 +22,13 @@
  */
 package com.oracle.graal.hotspot;
 
-import static com.oracle.graal.hotspot.CompileTheWorld.Options.CompileTheWorldClasspath;
-import static com.oracle.graal.hotspot.CompileTheWorld.Options.CompileTheWorldConfig;
-import static com.oracle.graal.hotspot.CompileTheWorld.Options.CompileTheWorldExcludeMethodFilter;
-import static com.oracle.graal.hotspot.CompileTheWorld.Options.CompileTheWorldMethodFilter;
-import static com.oracle.graal.hotspot.CompileTheWorld.Options.CompileTheWorldStartAt;
-import static com.oracle.graal.hotspot.CompileTheWorld.Options.CompileTheWorldStopAt;
-import static com.oracle.graal.hotspot.CompileTheWorld.Options.CompileTheWorldVerbose;
+import static com.oracle.graal.hotspot.CompileTheWorldOptions.CompileTheWorldClasspath;
+import static com.oracle.graal.hotspot.CompileTheWorldOptions.CompileTheWorldConfig;
+import static com.oracle.graal.hotspot.CompileTheWorldOptions.CompileTheWorldExcludeMethodFilter;
+import static com.oracle.graal.hotspot.CompileTheWorldOptions.CompileTheWorldMethodFilter;
+import static com.oracle.graal.hotspot.CompileTheWorldOptions.CompileTheWorldStartAt;
+import static com.oracle.graal.hotspot.CompileTheWorldOptions.CompileTheWorldStopAt;
+import static com.oracle.graal.hotspot.CompileTheWorldOptions.CompileTheWorldVerbose;
 import static jdk.internal.jvmci.compiler.Compiler.ExitVMOnException;
 import static jdk.internal.jvmci.compiler.Compiler.PrintBailout;
 import static jdk.internal.jvmci.compiler.Compiler.PrintStackTraceOnException;
@@ -66,9 +66,7 @@
 import jdk.internal.jvmci.hotspot.HotSpotVMConfig;
 import jdk.internal.jvmci.meta.ConstantPool;
 import jdk.internal.jvmci.meta.MetaAccessProvider;
-import jdk.internal.jvmci.options.Option;
 import jdk.internal.jvmci.options.OptionDescriptor;
-import jdk.internal.jvmci.options.OptionType;
 import jdk.internal.jvmci.options.OptionValue;
 import jdk.internal.jvmci.options.OptionValue.OverrideScope;
 import jdk.internal.jvmci.options.OptionsParser;
@@ -95,47 +93,6 @@
      */
     public static final String SUN_BOOT_CLASS_PATH = "sun.boot.class.path";
 
-    public static class Options {
-        // @formatter:off
-        @Option(help = "Compile all methods in all classes on given class path", type = OptionType.Debug)
-        public static final OptionValue<String> CompileTheWorldClasspath = new OptionValue<>(SUN_BOOT_CLASS_PATH);
-        @Option(help = "Verbose CompileTheWorld operation", type = OptionType.Debug)
-        public static final OptionValue<Boolean> CompileTheWorldVerbose = new OptionValue<>(true);
-        @Option(help = "The number of CompileTheWorld iterations to perform", type = OptionType.Debug)
-        public static final OptionValue<Integer> CompileTheWorldIterations = new OptionValue<>(1);
-        @Option(help = "Only compile methods matching this filter", type = OptionType.Debug)
-        public static final OptionValue<String> CompileTheWorldMethodFilter = new OptionValue<>(null);
-        @Option(help = "Exclude methods matching this filter from compilation", type = OptionType.Debug)
-        public static final OptionValue<String> CompileTheWorldExcludeMethodFilter = new OptionValue<>(null);
-        @Option(help = "First class to consider when using -XX:+CompileTheWorld", type = OptionType.Debug)
-        public static final OptionValue<Integer> CompileTheWorldStartAt = new OptionValue<>(1);
-        @Option(help = "Last class to consider when using -XX:+CompileTheWorld", type = OptionType.Debug)
-        public static final OptionValue<Integer> CompileTheWorldStopAt = new OptionValue<>(Integer.MAX_VALUE);
-        @Option(help = "Option value overrides to use during compile the world. For example, " +
-                       "to disable inlining and partial escape analysis specify '-PartialEscapeAnalysis -Inline'. " +
-                       "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 = "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
-
-        /**
-         * Overrides {@link #CompileTheWorldStartAt} and {@link #CompileTheWorldStopAt} from
-         * {@code -XX} HotSpot options of the same name if the latter have non-default values.
-         */
-        public static void overrideWithNativeOptions(HotSpotVMConfig c) {
-            if (c.compileTheWorldStartAt != 1) {
-                CompileTheWorldStartAt.setValue(c.compileTheWorldStartAt);
-            }
-            if (c.compileTheWorldStopAt != Integer.MAX_VALUE) {
-                CompileTheWorldStopAt.setValue(c.compileTheWorldStopAt);
-            }
-        }
-    }
-
     /**
      * A mechanism for overriding JVMCI options that affect compilation. A {@link Config} object
      * should be used in a try-with-resources statement to ensure overriding of options is scoped
@@ -149,7 +106,7 @@
      * </pre>
      */
     @SuppressWarnings("serial")
-    public static class Config extends HashMap<OptionValue<?>, Object>implements OptionConsumer {
+    public static class Config extends HashMap<OptionValue<?>, Object> implements OptionConsumer {
         /**
          * Creates a {@link Config} object by parsing a set of space separated override options.
          *
@@ -182,13 +139,22 @@
 
     private final HotSpotGraalCompiler compiler;
 
-    /** List of Zip/Jar files to compile (see {@link Options#CompileTheWorldClasspath}). */
+    /**
+     * List of Zip/Jar files to compile (see {@link CompileTheWorldOptions#CompileTheWorldClasspath}
+     * ).
+     */
     private final String files;
 
-    /** Class index to start compilation at (see {@link Options#CompileTheWorldStartAt}). */
+    /**
+     * Class index to start compilation at (see
+     * {@link CompileTheWorldOptions#CompileTheWorldStartAt}).
+     */
     private final int startAt;
 
-    /** Class index to stop compilation at (see {@link Options#CompileTheWorldStopAt}). */
+    /**
+     * Class index to stop compilation at (see {@link CompileTheWorldOptions#CompileTheWorldStopAt}
+     * ).
+     */
     private final int stopAt;
 
     /** Only compile methods matching one of the filters in this array if the array is non-null. */
@@ -250,9 +216,10 @@
 
     /**
      * Compiles all methods in all classes in the Zip/Jar archive files in
-     * {@link Options#CompileTheWorldClasspath}. If {@link Options#CompileTheWorldClasspath}
-     * contains the magic token {@link #SUN_BOOT_CLASS_PATH} passed up from HotSpot we take the
-     * files from the boot class path.
+     * {@link CompileTheWorldOptions#CompileTheWorldClasspath}. If
+     * {@link CompileTheWorldOptions#CompileTheWorldClasspath} contains the magic token
+     * {@link #SUN_BOOT_CLASS_PATH} passed up from HotSpot we take the files from the boot class
+     * path.
      */
     public void compile() throws Throwable {
         // By default only report statistics for the CTW threads themselves
@@ -334,8 +301,8 @@
          * DebugValueThreadFilter to filter on the thread names.
          */
         int threadCount = 1;
-        if (Options.CompileTheWorldMultiThreaded.getValue()) {
-            threadCount = Options.CompileTheWorldThreads.getValue();
+        if (CompileTheWorldOptions.CompileTheWorldMultiThreaded.getValue()) {
+            threadCount = CompileTheWorldOptions.CompileTheWorldThreads.getValue();
             if (threadCount == 0) {
                 threadCount = Runtime.getRuntime().availableProcessors();
             }
@@ -462,7 +429,7 @@
         long elapsedTime = System.currentTimeMillis() - start;
 
         println();
-        if (Options.CompileTheWorldMultiThreaded.getValue()) {
+        if (CompileTheWorldOptions.CompileTheWorldMultiThreaded.getValue()) {
             TTY.println("CompileTheWorld : Done (%d classes, %d methods, %d ms elapsed, %d ms compile time, %d bytes of memory used)", classFileCounter, compiledMethodsCounter.get(), elapsedTime,
                             compileTime.get(), memoryUsed.get());
         } else {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorldOptions.java	Wed Sep 16 21:56:12 2015 +0200
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.hotspot;
+
+import jdk.internal.jvmci.hotspot.HotSpotVMConfig;
+import jdk.internal.jvmci.options.Option;
+import jdk.internal.jvmci.options.OptionType;
+import jdk.internal.jvmci.options.OptionValue;
+
+/**
+ * Options related to {@link CompileTheWorld}.
+ *
+ * Note: This must be a top level class to work around for <a
+ * href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=477597">Eclipse bug 477597</a>.
+ */
+public class CompileTheWorldOptions {
+    // @formatter:off
+    @Option(help = "Compile all methods in all classes on given class path", type = OptionType.Debug)
+    public static final OptionValue<String> CompileTheWorldClasspath = new OptionValue<>(CompileTheWorld.SUN_BOOT_CLASS_PATH);
+    @Option(help = "Verbose CompileTheWorld operation", type = OptionType.Debug)
+    public static final OptionValue<Boolean> CompileTheWorldVerbose = new OptionValue<>(true);
+    @Option(help = "The number of CompileTheWorld iterations to perform", type = OptionType.Debug)
+    public static final OptionValue<Integer> CompileTheWorldIterations = new OptionValue<>(1);
+    @Option(help = "Only compile methods matching this filter", type = OptionType.Debug)
+    public static final OptionValue<String> CompileTheWorldMethodFilter = new OptionValue<>(null);
+    @Option(help = "Exclude methods matching this filter from compilation", type = OptionType.Debug)
+    public static final OptionValue<String> CompileTheWorldExcludeMethodFilter = new OptionValue<>(null);
+    @Option(help = "First class to consider when using -XX:+CompileTheWorld", type = OptionType.Debug)
+    public static final OptionValue<Integer> CompileTheWorldStartAt = new OptionValue<>(1);
+    @Option(help = "Last class to consider when using -XX:+CompileTheWorld", type = OptionType.Debug)
+    public static final OptionValue<Integer> CompileTheWorldStopAt = new OptionValue<>(Integer.MAX_VALUE);
+    @Option(help = "Option value overrides to use during compile the world. For example, " +
+                   "to disable inlining and partial escape analysis specify '-PartialEscapeAnalysis -Inline'. " +
+                   "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 = "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
+
+    /**
+     * Overrides {@link #CompileTheWorldStartAt} and {@link #CompileTheWorldStopAt} from {@code -XX}
+     * HotSpot options of the same name if the latter have non-default values.
+     */
+    public static void overrideWithNativeOptions(HotSpotVMConfig c) {
+        if (c.compileTheWorldStartAt != 1) {
+            CompileTheWorldStartAt.setValue(c.compileTheWorldStartAt);
+        }
+        if (c.compileTheWorldStopAt != Integer.MAX_VALUE) {
+            CompileTheWorldStopAt.setValue(c.compileTheWorldStopAt);
+        }
+    }
+}
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java	Wed Sep 16 21:56:12 2015 +0200
@@ -93,7 +93,7 @@
 
     public void compileTheWorld() throws Throwable {
         CompilerToVM compilerToVM = jvmciRuntime.getCompilerToVM();
-        int iterations = CompileTheWorld.Options.CompileTheWorldIterations.getValue();
+        int iterations = CompileTheWorldOptions.CompileTheWorldIterations.getValue();
         for (int i = 0; i < iterations; i++) {
             compilerToVM.resetCompilationStatistics();
             TTY.println("CompileTheWorld : iteration " + i);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java	Wed Sep 16 21:56:12 2015 +0200
@@ -95,7 +95,7 @@
     HotSpotGraalRuntime(HotSpotJVMCIRuntime jvmciRuntime, HotSpotGraalCompilerFactory compilerFactory) {
 
         HotSpotVMConfig config = jvmciRuntime.getConfig();
-        CompileTheWorld.Options.overrideWithNativeOptions(config);
+        CompileTheWorldOptions.overrideWithNativeOptions(config);
 
         // Only set HotSpotPrintInlining if it still has its default value (false).
         if (HotSpotPrintInlining.getValue() == false) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java	Wed Sep 16 21:56:12 2015 +0200
@@ -25,7 +25,7 @@
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.JAVA_THREAD_THREAD_OBJECT_LOCATION;
 import static com.oracle.graal.hotspot.replacements.SystemSubstitutions.JAVA_TIME_MILLIS;
 import static com.oracle.graal.hotspot.replacements.SystemSubstitutions.JAVA_TIME_NANOS;
-import static com.oracle.graal.java.BytecodeParser.Options.InlineDuringParsing;
+import static com.oracle.graal.java.BytecodeParserOptions.InlineDuringParsing;
 import static sun.misc.Version.jdkMajorVersion;
 import static sun.misc.Version.jdkMinorVersion;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippets.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippets.java	Wed Sep 16 21:56:12 2015 +0200
@@ -25,8 +25,8 @@
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.PRIMARY_SUPERS_LOCATION;
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.SECONDARY_SUPER_CACHE_LOCATION;
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.loadHubIntrinsic;
-import static com.oracle.graal.hotspot.replacements.InstanceOfSnippets.Options.TypeCheckMaxHints;
-import static com.oracle.graal.hotspot.replacements.InstanceOfSnippets.Options.TypeCheckMinProfileHitProbability;
+import static com.oracle.graal.hotspot.replacements.InstanceOfSnippetsOptions.TypeCheckMaxHints;
+import static com.oracle.graal.hotspot.replacements.InstanceOfSnippetsOptions.TypeCheckMinProfileHitProbability;
 import static com.oracle.graal.hotspot.replacements.TypeCheckSnippetUtils.checkSecondarySubType;
 import static com.oracle.graal.hotspot.replacements.TypeCheckSnippetUtils.checkUnknownSubType;
 import static com.oracle.graal.hotspot.replacements.TypeCheckSnippetUtils.createHints;
@@ -51,9 +51,6 @@
 import jdk.internal.jvmci.meta.DeoptimizationReason;
 import jdk.internal.jvmci.meta.JavaKind;
 import jdk.internal.jvmci.meta.TriState;
-import jdk.internal.jvmci.options.Option;
-import jdk.internal.jvmci.options.OptionType;
-import jdk.internal.jvmci.options.OptionValue;
 
 import com.oracle.graal.compiler.common.type.StampFactory;
 import com.oracle.graal.hotspot.meta.HotSpotProviders;
@@ -86,9 +83,9 @@
  * Snippets used for implementing the type test of an instanceof instruction. Since instanceof is a
  * floating node, it is lowered separately for each of its usages.
  *
- * The type tests implemented are described in the paper
- * <a href="http://dl.acm.org/citation.cfm?id=583821"> Fast subtype checking in the HotSpot JVM</a>
- * by Cliff Click and John Rose.
+ * The type tests implemented are described in the paper <a
+ * href="http://dl.acm.org/citation.cfm?id=583821"> Fast subtype checking in the HotSpot JVM</a> by
+ * Cliff Click and John Rose.
  */
 public class InstanceOfSnippets implements Snippets {
 
@@ -232,19 +229,6 @@
         return trueValue;
     }
 
-    static class Options {
-
-        // @formatter:off
-        @Option(help = "If the probability that a type check will hit one the profiled types (up to " +
-                       "TypeCheckMaxHints) is below this value, the type check will be compiled without profiling info", type = OptionType.Expert)
-        static final OptionValue<Double> TypeCheckMinProfileHitProbability = new OptionValue<>(0.5);
-
-        @Option(help = "The maximum number of profiled types that will be used when compiling a profiled type check. " +
-                        "Note that TypeCheckMinProfileHitProbability also influences whether profiling info is used in compiled type checks.", type = OptionType.Expert)
-        static final OptionValue<Integer> TypeCheckMaxHints = new OptionValue<>(2);
-        // @formatter:on
-    }
-
     public static class Templates extends InstanceOfSnippetsTemplates {
 
         private final SnippetInfo instanceofWithProfile = snippet(InstanceOfSnippets.class, "instanceofWithProfile");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippetsOptions.java	Wed Sep 16 21:56:12 2015 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.hotspot.replacements;
+
+import jdk.internal.jvmci.options.Option;
+import jdk.internal.jvmci.options.OptionType;
+import jdk.internal.jvmci.options.OptionValue;
+
+/**
+ * Options related to {@link InstanceOfSnippets}.
+ *
+ * Note: This must be a top level class to work around for <a
+ * href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=477597">Eclipse bug 477597</a>.
+ */
+class InstanceOfSnippetsOptions {
+
+    // @formatter:off
+    @Option(help = "If the probability that a type check will hit one the profiled types (up to " +
+                   "TypeCheckMaxHints) is below this value, the type check will be compiled without profiling info", type = OptionType.Expert)
+    static final OptionValue<Double> TypeCheckMinProfileHitProbability = new OptionValue<>(0.5);
+
+    @Option(help = "The maximum number of profiled types that will be used when compiling a profiled type check. " +
+                    "Note that TypeCheckMinProfileHitProbability also influences whether profiling info is used in compiled type checks.", type = OptionType.Expert)
+    static final OptionValue<Integer> TypeCheckMaxHints = new OptionValue<>(2);
+    // @formatter:on
+}
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java	Wed Sep 16 21:56:12 2015 +0200
@@ -231,11 +231,11 @@
 import static com.oracle.graal.compiler.common.GraalOptions.StressInvokeWithExceptionNode;
 import static com.oracle.graal.compiler.common.type.StampFactory.objectNonNull;
 import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.INLINE_DURING_PARSING;
-import static com.oracle.graal.java.BytecodeParser.Options.DumpDuringGraphBuilding;
-import static com.oracle.graal.java.BytecodeParser.Options.FailedLoopExplosionIsFatal;
-import static com.oracle.graal.java.BytecodeParser.Options.MaximumLoopExplosionCount;
-import static com.oracle.graal.java.BytecodeParser.Options.TraceInlineDuringParsing;
-import static com.oracle.graal.java.BytecodeParser.Options.TraceParserPlugins;
+import static com.oracle.graal.java.BytecodeParserOptions.DumpDuringGraphBuilding;
+import static com.oracle.graal.java.BytecodeParserOptions.FailedLoopExplosionIsFatal;
+import static com.oracle.graal.java.BytecodeParserOptions.MaximumLoopExplosionCount;
+import static com.oracle.graal.java.BytecodeParserOptions.TraceInlineDuringParsing;
+import static com.oracle.graal.java.BytecodeParserOptions.TraceParserPlugins;
 import static com.oracle.graal.nodes.type.StampTool.isPointerNonNull;
 import static java.lang.String.format;
 import static jdk.internal.jvmci.common.JVMCIError.guarantee;
@@ -288,10 +288,6 @@
 import jdk.internal.jvmci.meta.ResolvedJavaMethod;
 import jdk.internal.jvmci.meta.ResolvedJavaType;
 import jdk.internal.jvmci.meta.TriState;
-import jdk.internal.jvmci.options.Option;
-import jdk.internal.jvmci.options.OptionType;
-import jdk.internal.jvmci.options.OptionValue;
-import jdk.internal.jvmci.options.StableOptionValue;
 
 import com.oracle.graal.bytecode.BytecodeLookupSwitch;
 import com.oracle.graal.bytecode.BytecodeStream;
@@ -422,47 +418,15 @@
  */
 public class BytecodeParser implements GraphBuilderContext {
 
-    public static class Options {
-        @Option(help = "The trace level for the bytecode parser used when building a graph from bytecode", type = OptionType.Debug)//
-        public static final OptionValue<Integer> TraceBytecodeParserLevel = new OptionValue<>(0);
-
-        @Option(help = "Inlines trivial methods during bytecode parsing.", type = OptionType.Expert)//
-        public static final StableOptionValue<Boolean> InlineDuringParsing = new StableOptionValue<>(true);
-
-        @Option(help = "Inlines intrinsic methods during bytecode parsing.", type = OptionType.Expert)//
-        public static final StableOptionValue<Boolean> InlineIntrinsicsDuringParsing = new StableOptionValue<>(true);
-
-        @Option(help = "Traces inlining performed during bytecode parsing.", type = OptionType.Debug)//
-        public static final StableOptionValue<Boolean> TraceInlineDuringParsing = new StableOptionValue<>(false);
-
-        @Option(help = "Traces use of plugins during bytecode parsing.", type = OptionType.Debug)//
-        public static final StableOptionValue<Boolean> TraceParserPlugins = new StableOptionValue<>(false);
-
-        @Option(help = "Maximum depth when inlining during bytecode parsing.", type = OptionType.Debug)//
-        public static final StableOptionValue<Integer> InlineDuringParsingMaxDepth = new StableOptionValue<>(10);
-
-        @Option(help = "Dump graphs after non-trivial changes during bytecode parsing.", type = OptionType.Debug)//
-        public static final StableOptionValue<Boolean> DumpDuringGraphBuilding = new StableOptionValue<>(false);
-
-        @Option(help = "Max number of loop explosions per method.", type = OptionType.Debug)//
-        public static final OptionValue<Integer> MaximumLoopExplosionCount = new OptionValue<>(10000);
-
-        @Option(help = "Do not bail out but throw an exception on failed loop explosion.", type = OptionType.Debug)//
-        public static final OptionValue<Boolean> FailedLoopExplosionIsFatal = new OptionValue<>(false);
-
-        @Option(help = "When creating info points hide the methods of the substitutions.", type = OptionType.Debug)//
-        public static final OptionValue<Boolean> HideSubstitutionStates = new OptionValue<>(false);
-    }
-
     /**
-     * The minimum value to which {@link Options#TraceBytecodeParserLevel} must be set to trace the
-     * bytecode instructions as they are parsed.
+     * The minimum value to which {@link BytecodeParserOptions#TraceBytecodeParserLevel} must be set
+     * to trace the bytecode instructions as they are parsed.
      */
     public static final int TRACELEVEL_INSTRUCTIONS = 1;
 
     /**
-     * The minimum value to which {@link Options#TraceBytecodeParserLevel} must be set to trace the
-     * frame state before each bytecode instruction as it is parsed.
+     * The minimum value to which {@link BytecodeParserOptions#TraceBytecodeParserLevel} must be set
+     * to trace the frame state before each bytecode instruction as it is parsed.
      */
     public static final int TRACELEVEL_STATE = 2;
 
@@ -2769,7 +2733,7 @@
     }
 
     private boolean traceState() {
-        if (Debug.isEnabled() && Options.TraceBytecodeParserLevel.getValue() >= TRACELEVEL_STATE && Debug.isLogEnabled()) {
+        if (Debug.isEnabled() && BytecodeParserOptions.TraceBytecodeParserLevel.getValue() >= TRACELEVEL_STATE && Debug.isLogEnabled()) {
             frameState.traceState();
         }
         return true;
@@ -3988,7 +3952,7 @@
     }
 
     protected boolean traceInstruction(int bci, int opcode, boolean blockStart) {
-        if (Debug.isEnabled() && Options.TraceBytecodeParserLevel.getValue() >= TRACELEVEL_INSTRUCTIONS && Debug.isLogEnabled()) {
+        if (Debug.isEnabled() && BytecodeParserOptions.TraceBytecodeParserLevel.getValue() >= TRACELEVEL_INSTRUCTIONS && Debug.isLogEnabled()) {
             traceInstructionHelper(bci, opcode, blockStart);
         }
         return true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParserOptions.java	Wed Sep 16 21:56:12 2015 +0200
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.java;
+
+import jdk.internal.jvmci.options.Option;
+import jdk.internal.jvmci.options.OptionType;
+import jdk.internal.jvmci.options.OptionValue;
+import jdk.internal.jvmci.options.StableOptionValue;
+
+/**
+ * Options related to {@link BytecodeParser}.
+ *
+ * Note: This must be a top level class to work around for <a
+ * href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=477597">Eclipse bug 477597</a>.
+ */
+public class BytecodeParserOptions {
+    // @formatter:off
+    @Option(help = "The trace level for the bytecode parser used when building a graph from bytecode", type = OptionType.Debug)
+    public static final OptionValue<Integer> TraceBytecodeParserLevel = new OptionValue<>(0);
+
+    @Option(help = "Inlines trivial methods during bytecode parsing.", type = OptionType.Expert)
+    public static final StableOptionValue<Boolean> InlineDuringParsing = new StableOptionValue<>(true);
+
+    @Option(help = "Inlines intrinsic methods during bytecode parsing.", type = OptionType.Expert)
+    public static final StableOptionValue<Boolean> InlineIntrinsicsDuringParsing = new StableOptionValue<>(true);
+
+    @Option(help = "Traces inlining performed during bytecode parsing.", type = OptionType.Debug)
+    public static final StableOptionValue<Boolean> TraceInlineDuringParsing = new StableOptionValue<>(false);
+
+    @Option(help = "Traces use of plugins during bytecode parsing.", type = OptionType.Debug)
+    public static final StableOptionValue<Boolean> TraceParserPlugins = new StableOptionValue<>(false);
+
+    @Option(help = "Maximum depth when inlining during bytecode parsing.", type = OptionType.Debug)
+    public static final StableOptionValue<Integer> InlineDuringParsingMaxDepth = new StableOptionValue<>(10);
+
+    @Option(help = "Dump graphs after non-trivial changes during bytecode parsing.", type = OptionType.Debug)
+    public static final StableOptionValue<Boolean> DumpDuringGraphBuilding = new StableOptionValue<>(false);
+
+    @Option(help = "Max number of loop explosions per method.", type = OptionType.Debug)
+    public static final OptionValue<Integer> MaximumLoopExplosionCount = new OptionValue<>(10000);
+
+    @Option(help = "Do not bail out but throw an exception on failed loop explosion.", type = OptionType.Debug)
+    public static final OptionValue<Boolean> FailedLoopExplosionIsFatal = new OptionValue<>(false);
+
+    @Option(help = "When creating info points hide the methods of the substitutions.", type = OptionType.Debug)
+    public static final OptionValue<Boolean> HideSubstitutionStates = new OptionValue<>(false);
+    // @formatter:on
+}
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java	Wed Sep 16 21:56:12 2015 +0200
@@ -33,7 +33,7 @@
 import static com.oracle.graal.bytecode.Bytecodes.SWAP;
 import static com.oracle.graal.graph.iterators.NodePredicates.isA;
 import static com.oracle.graal.graph.iterators.NodePredicates.isNotA;
-import static com.oracle.graal.java.BytecodeParser.Options.HideSubstitutionStates;
+import static com.oracle.graal.java.BytecodeParserOptions.HideSubstitutionStates;
 import static com.oracle.graal.nodes.FrameState.TWO_SLOT_MARKER;
 import static jdk.internal.jvmci.common.JVMCIError.shouldNotReachHere;
 
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InlineDuringParsingPlugin.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InlineDuringParsingPlugin.java	Wed Sep 16 21:56:12 2015 +0200
@@ -23,7 +23,7 @@
 package com.oracle.graal.replacements;
 
 import static com.oracle.graal.compiler.common.GraalOptions.TrivialInliningSize;
-import static com.oracle.graal.java.BytecodeParser.Options.InlineDuringParsingMaxDepth;
+import static com.oracle.graal.java.BytecodeParserOptions.InlineDuringParsingMaxDepth;
 import jdk.internal.jvmci.meta.JavaType;
 import jdk.internal.jvmci.meta.ResolvedJavaMethod;
 
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java	Wed Sep 16 21:56:12 2015 +0200
@@ -22,9 +22,9 @@
  */
 package com.oracle.graal.replacements;
 
-import static com.oracle.graal.java.BytecodeParser.Options.DumpDuringGraphBuilding;
-import static com.oracle.graal.java.BytecodeParser.Options.FailedLoopExplosionIsFatal;
-import static com.oracle.graal.java.BytecodeParser.Options.MaximumLoopExplosionCount;
+import static com.oracle.graal.java.BytecodeParserOptions.DumpDuringGraphBuilding;
+import static com.oracle.graal.java.BytecodeParserOptions.FailedLoopExplosionIsFatal;
+import static com.oracle.graal.java.BytecodeParserOptions.MaximumLoopExplosionCount;
 import static jdk.internal.jvmci.common.JVMCIError.unimplemented;
 
 import java.util.ArrayList;
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Wed Sep 16 21:17:42 2015 +0200
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Wed Sep 16 21:56:12 2015 +0200
@@ -25,8 +25,8 @@
 import static com.oracle.graal.compiler.common.GraalOptions.DeoptALot;
 import static com.oracle.graal.compiler.common.GraalOptions.OptCanonicalizer;
 import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.INLINE_AFTER_PARSING;
-import static com.oracle.graal.java.BytecodeParser.Options.InlineDuringParsing;
-import static com.oracle.graal.java.BytecodeParser.Options.InlineIntrinsicsDuringParsing;
+import static com.oracle.graal.java.BytecodeParserOptions.InlineDuringParsing;
+import static com.oracle.graal.java.BytecodeParserOptions.InlineIntrinsicsDuringParsing;
 import static com.oracle.graal.phases.common.DeadCodeEliminationPhase.Optionality.Required;
 import static java.lang.String.format;
 import static jdk.internal.jvmci.meta.MetaUtil.toInternalName;
--- a/mx.graal/suite.py	Wed Sep 16 21:17:42 2015 +0200
+++ b/mx.graal/suite.py	Wed Sep 16 21:56:12 2015 +0200
@@ -6,7 +6,7 @@
     "suites": [
             {
                "name" : "jvmci",
-               "version" : "c79ee6cd7f53f76982728075c62154f33a0452d3",
+               "version" : "ec96f33a101dbd76da419ce1d2f0ed70b983966c",
                "urls" : [
                     {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"},
                     {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},
@@ -14,7 +14,7 @@
             },
             {
                "name" : "truffle",
-               "version" : "50056a161d7f4c9374ab472c93d16059de952aa4",
+               "version" : "e3c6cca3ef533b3ea4cf56e07e51473d0bb8006b",
                "urls" : [
                     {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/truffle", "kind" : "hg"},
                     {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},