Mercurial > hg > graal-compiler
changeset 6570:d4f5301e9c7b
added method to DebugScope to simplify dumping of a graph from with Eclipse
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 24 Oct 2012 17:35:44 +0200 |
parents | dcad13b2f6e8 |
children | f182f58459fa |
files | graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/DebugScope.java |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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> T scope(String newName, Runnable runnable, Callable<T> callable, boolean sandbox, Object[] newContext) { DebugScope oldContext = getInstance(); DebugConfig oldConfig = getConfig();