Mercurial > hg > graal-compiler
changeset 15254:a83af3413927
Show shorter class names in the Truffle compilation histogram.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Tue, 22 Apr 2014 00:52:56 +0100 |
parents | 9ff9f6643986 |
children | cf6aedb39215 |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); }