Mercurial > hg > graal-compiler
changeset 17416:f7ba2423fbc3
Truffle: make TraceTruffleTransferToInterpreter and TraceTruffleAssumptions stack trace limit configurable
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Mon, 13 Oct 2014 12:10:16 +0200 |
parents | e30f38c2ee16 |
children | 2915eff532d4 5c8660c0e760 |
files | graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedAssumption.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Mon Oct 13 12:10:06 2014 +0200 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Mon Oct 13 12:10:16 2014 +0200 @@ -282,7 +282,7 @@ private static void logTransferToInterpreter() { final int skip = 2; - final int limit = 20; + final int limit = TraceTruffleStackTraceLimit.getValue(); StackTraceElement[] stackTrace = new Throwable().getStackTrace(); String suffix = stackTrace.length > skip + limit ? "\n ..." : ""; TTY.out().out().println(Arrays.stream(stackTrace).skip(skip).limit(limit).map(StackTraceElement::toString).collect(Collectors.joining("\n ", "", suffix)));
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedAssumption.java Mon Oct 13 12:10:06 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedAssumption.java Mon Oct 13 12:10:16 2014 +0200 @@ -105,7 +105,7 @@ private static void logStackTrace() { final int skip = 1; - final int limit = 20; + final int limit = TraceTruffleStackTraceLimit.getValue(); StackTraceElement[] stackTrace = new Throwable().getStackTrace(); String suffix = stackTrace.length > skip + limit ? "\n ..." : ""; TTY.out().out().println(Arrays.stream(stackTrace).skip(skip).limit(limit).map(StackTraceElement::toString).collect(Collectors.joining("\n ", "", suffix)));
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Mon Oct 13 12:10:06 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Mon Oct 13 12:10:16 2014 +0200 @@ -126,6 +126,8 @@ public static final OptionValue<Boolean> TraceTruffleTransferToInterpreter = new StableOptionValue<>(false); @Option(help = "Print stack trace on assumption invalidation") public static final OptionValue<Boolean> TraceTruffleAssumptions = new StableOptionValue<>(false); + @Option(help = "Number of stack trace elements printed by TraceTruffleTransferToInterpreter and TraceTruffleAssumptions") + public static final OptionValue<Integer> TraceTruffleStackTraceLimit = new OptionValue<>(20); @Option(help = "Print a summary of execution counts for all executed CallTargets. Introduces counter overhead for each call.") public static final OptionValue<Boolean> TruffleCallTargetProfiling = new StableOptionValue<>(false); // @formatter:on