# HG changeset patch # User Doug Simon # Date 1392821925 -3600 # Node ID 272995b3c0195212810c67449a01f0f06bc169fe # Parent 80e84e3fa55b7b9700acdaa855bcc6d0a15b6229 HSAIL: ensure debug configuration is initialized on Sumatra threads using Graal Contributed-by: Eric Caspole diff -r 80e84e3fa55b -r 272995b3c019 graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/ForEachToGraal.java --- a/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/ForEachToGraal.java Wed Feb 19 15:57:23 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/ForEachToGraal.java Wed Feb 19 15:58:45 2014 +0100 @@ -32,6 +32,7 @@ import com.oracle.graal.compiler.hsail.*; import com.oracle.graal.compiler.target.*; import com.oracle.graal.debug.*; +import com.oracle.graal.debug.internal.*; import com.oracle.graal.graph.iterators.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.hsail.*; @@ -40,6 +41,7 @@ import com.oracle.graal.nodes.java.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.util.*; +import com.oracle.graal.printer.*; /** * Implements compile and dispatch of Java code containing lambda constructs. Currently only used by @@ -68,6 +70,11 @@ } } + // Ensure a debug configuration for this thread is initialized + if (DebugScope.getConfig() == null) { + DebugEnvironment.initialize(System.out); + } + HSAILHotSpotBackend backend = getHSAILBackend(); Providers providers = backend.getProviders(); StructuredGraph graph = new StructuredGraph(((HotSpotMetaAccessProvider) providers.getMetaAccess()).lookupJavaMethod(acceptMethod));