Mercurial > hg > graal-compiler
changeset 23257:926fafcb44b8
only print stack traces from CompileTheWorld in verbose mode
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 05 Jan 2016 12:06:37 +0100 |
parents | 907a1859f51d |
children | 61e5bc24179e |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java Tue Jan 05 01:39:17 2016 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java Tue Jan 05 12:06:37 2016 +0100 @@ -283,6 +283,12 @@ } } + public void printStackTrace(Throwable t) { + if (verbose) { + t.printStackTrace(TTY.out); + } + } + @SuppressWarnings("unused") private static void dummy() { } @@ -484,7 +490,7 @@ CompilationTask task = new CompilationTask(jvmciRuntime, compiler, new HotSpotCompilationRequest(dummyMethod, entryBCI, 0L), useProfilingInfo, installAsDefault); task.runCompilation(); } catch (NoSuchMethodException | SecurityException e1) { - e1.printStackTrace(); + printStackTrace(e1); } /* @@ -597,7 +603,7 @@ } } catch (Throwable t) { println("CompileTheWorld (%d) : Skipping %s %s", classFileCounter, className, t.toString()); - t.printStackTrace(); + printStackTrace(t); } } cpe.close(); @@ -688,7 +694,7 @@ } catch (Throwable t) { // Catch everything and print a message println("CompileTheWorld (%d) : Error compiling method: %s", counter, method.format("%H.%n(%p):%r")); - t.printStackTrace(TTY.out); + printStackTrace(t); } }