# HG changeset patch # User Doug Simon # Date 1351092944 -7200 # Node ID d4f5301e9c7b4059f0447626000cd0e736014c44 # Parent dcad13b2f6e8c7fd804fd524760e60fe001df75f added method to DebugScope to simplify dumping of a graph from with Eclipse diff -r dcad13b2f6e8 -r d4f5301e9c7b graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/DebugScope.java --- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/DebugScope.java Mon Oct 22 20:22:50 2012 +0200 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/DebugScope.java Wed Oct 24 17:35:44 2012 +0200 @@ -126,6 +126,18 @@ } } + /** + * This method exists mainly to allow a debugger (e.g., Eclipse) to force dump a graph. + */ + public static void dump(Object object, String message) { + DebugConfig config = getConfig(); + if (config != null) { + for (DebugDumpHandler dumpHandler : config.dumpHandlers()) { + dumpHandler.dump(object, message); + } + } + } + public T scope(String newName, Runnable runnable, Callable callable, boolean sandbox, Object[] newContext) { DebugScope oldContext = getInstance(); DebugConfig oldConfig = getConfig();