# HG changeset patch # User Chris Seaton # Date 1398124376 -3600 # Node ID a83af341392726f8bb74655c417f8554ce92dbb6 # Parent 9ff9f6643986a45afb6698ec99496c5a38250394 Show shorter class names in the Truffle compilation histogram. diff -r 9ff9f6643986 -r a83af3413927 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Sat Apr 19 12:48:19 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Tue Apr 22 00:52:56 2014 +0100 @@ -124,7 +124,16 @@ if (TraceTruffleCompilationHistogram.getValue() && constantReceivers != null) { DebugHistogram histogram = Debug.createHistogram("Expanded Truffle Nodes"); for (Constant c : constantReceivers) { - histogram.add(providers.getMetaAccess().lookupJavaType(c).getName()); + String javaName = MetaUtil.toJavaName(providers.getMetaAccess().lookupJavaType(c), false); + + // The DSL uses nested classes with redundant names - only show the inner class + int index = javaName.indexOf('$'); + if (index != -1) { + javaName = javaName.substring(index + 1); + } + + histogram.add(javaName); + } new DebugHistogramAsciiPrinter(TTY.out().out()).print(histogram); }