Mercurial > hg > graal-compiler
changeset 22849:72b9db37cf22
Only dump context objects once
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 19 Oct 2015 17:14:33 -0700 |
parents | 657db06a6bbe |
children | ed3ff844b0db |
files | graal/com.oracle.graal.debug/src/com/oracle/graal/debug/GraalDebugConfig.java |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/GraalDebugConfig.java Sun Oct 18 23:16:09 2015 -0700 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/GraalDebugConfig.java Mon Oct 19 17:14:33 2015 -0700 @@ -278,13 +278,16 @@ } Debug.setConfig(Debug.fixedConfig(Debug.DEFAULT_LOG_LEVEL, Debug.DEFAULT_LOG_LEVEL, false, false, false, false, dumpHandlers, verifyHandlers, output)); Debug.log(String.format("Exception occurred in scope: %s", Debug.currentScope())); + HashSet<Object> firstSeen = new HashSet<>(); for (Object o : Debug.context()) { - if (Options.DumpOnError.getValue()) { - Debug.dump(o, "Exception: " + e.toString()); - } else { - Debug.log("Context obj %s", o); + // Only dump a context object once. + if (firstSeen.add(o)) { + if (Options.DumpOnError.getValue()) { + Debug.dump(o, "Exception: " + e.toString()); + } else { + Debug.log("Context obj %s", o); + } } - } return null; }