Mercurial > hg > truffle
diff graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java @ 12747:b5cf28c97430
replaced global snippet and template node metrics with per-snippet and per-template metrics
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sun, 10 Nov 2013 21:34:18 +0100 |
parents | 31ed7cd96914 |
children | c9660efac5f6 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Sun Nov 10 21:31:18 2013 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Sun Nov 10 21:34:18 2013 +0100 @@ -83,8 +83,6 @@ private static final boolean UseSnippetGraphCache = Boolean.parseBoolean(System.getProperty("graal.useSnippetGraphCache", "true")); private static final DebugTimer SnippetPreparationTime = Debug.timer("SnippetPreparationTime"); - private static final DebugMetric SnippetGraphsNodeCount = Debug.metric("SnippetGraphsNodeCount"); - public StructuredGraph getSnippet(ResolvedJavaMethod method) { assert method.getAnnotation(Snippet.class) != null : "Snippet must be annotated with @" + Snippet.class.getSimpleName(); assert !Modifier.isAbstract(method.getModifiers()) && !Modifier.isNative(method.getModifiers()) : "Snippet must not be abstract or native"; @@ -93,7 +91,7 @@ if (graph == null) { try (TimerCloseable a = SnippetPreparationTime.start()) { StructuredGraph newGraph = makeGraph(method, null, inliningPolicy(method), method.getAnnotation(Snippet.class).removeAllFrameStates()); - SnippetGraphsNodeCount.add(newGraph.getNodeCount()); + Debug.metric("SnippetNodeCount[" + method.getName() + "]").add(newGraph.getNodeCount()); if (!UseSnippetGraphCache) { return newGraph; }