< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java

Print this page




 267                 GraphBuilderConfiguration graphBuilderConfig = graphBuilderPhase.getGraphBuilderConfig();
 268                 graphBuilderConfig = graphBuilderConfig.withNodeSourcePosition(true);
 269                 GraphBuilderPhase newGraphBuilderPhase = new GraphBuilderPhase(graphBuilderConfig);
 270                 newGbs.findPhase(GraphBuilderPhase.class).set(newGraphBuilderPhase);
 271             }
 272             if (isOSR) {
 273                 // We must not clear non liveness for OSR compilations.
 274                 GraphBuilderPhase graphBuilderPhase = (GraphBuilderPhase) newGbs.findPhase(GraphBuilderPhase.class).previous();
 275                 GraphBuilderConfiguration graphBuilderConfig = graphBuilderPhase.getGraphBuilderConfig();
 276                 GraphBuilderPhase newGraphBuilderPhase = new GraphBuilderPhase(graphBuilderConfig);
 277                 newGbs.findPhase(GraphBuilderPhase.class).set(newGraphBuilderPhase);
 278                 newGbs.appendPhase(new OnStackReplacementPhase());
 279             }
 280             return newGbs;
 281         }
 282         return suite;
 283     }
 284 
 285     public Object mbean() {
 286         if (graalRuntime instanceof HotSpotGraalRuntime) {
 287             return ((HotSpotGraalRuntime)graalRuntime).mbean();
 288         }
 289         return null;
 290     }
 291 
 292     /**
 293      * Converts {@code method} to a String with {@link JavaMethod#format(String)} and the format
 294      * string {@code "%H.%n(%p)"}.
 295      */
 296     static String str(JavaMethod method) {
 297         return method.format("%H.%n(%p)");
 298     }
 299 
 300     /**
 301      * Wraps {@code obj} in a {@link Formatter} that standardizes formatting for certain objects.
 302      */
 303     static Formattable fmt(Object obj) {
 304         return new Formattable() {
 305             @Override
 306             public void formatTo(Formatter buf, int flags, int width, int precision) {
 307                 if (obj instanceof Throwable) {


 267                 GraphBuilderConfiguration graphBuilderConfig = graphBuilderPhase.getGraphBuilderConfig();
 268                 graphBuilderConfig = graphBuilderConfig.withNodeSourcePosition(true);
 269                 GraphBuilderPhase newGraphBuilderPhase = new GraphBuilderPhase(graphBuilderConfig);
 270                 newGbs.findPhase(GraphBuilderPhase.class).set(newGraphBuilderPhase);
 271             }
 272             if (isOSR) {
 273                 // We must not clear non liveness for OSR compilations.
 274                 GraphBuilderPhase graphBuilderPhase = (GraphBuilderPhase) newGbs.findPhase(GraphBuilderPhase.class).previous();
 275                 GraphBuilderConfiguration graphBuilderConfig = graphBuilderPhase.getGraphBuilderConfig();
 276                 GraphBuilderPhase newGraphBuilderPhase = new GraphBuilderPhase(graphBuilderConfig);
 277                 newGbs.findPhase(GraphBuilderPhase.class).set(newGraphBuilderPhase);
 278                 newGbs.appendPhase(new OnStackReplacementPhase());
 279             }
 280             return newGbs;
 281         }
 282         return suite;
 283     }
 284 
 285     public Object mbean() {
 286         if (graalRuntime instanceof HotSpotGraalRuntime) {
 287             return ((HotSpotGraalRuntime) graalRuntime).getMBean();
 288         }
 289         return null;
 290     }
 291 
 292     /**
 293      * Converts {@code method} to a String with {@link JavaMethod#format(String)} and the format
 294      * string {@code "%H.%n(%p)"}.
 295      */
 296     static String str(JavaMethod method) {
 297         return method.format("%H.%n(%p)");
 298     }
 299 
 300     /**
 301      * Wraps {@code obj} in a {@link Formatter} that standardizes formatting for certain objects.
 302      */
 303     static Formattable fmt(Object obj) {
 304         return new Formattable() {
 305             @Override
 306             public void formatTo(Formatter buf, int flags, int width, int precision) {
 307                 if (obj instanceof Throwable) {
< prev index next >