Mercurial > hg > graal-compiler
changeset 14765:365800f2a7aa
SnippetCounter: use own location for counter
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Wed, 26 Mar 2014 21:52:45 +0100 |
parents | 5823c399e28f |
children | 390d72c7cc04 |
files | graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetCounter.java |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetCounter.java Wed Mar 26 14:43:50 2014 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetCounter.java Wed Mar 26 21:52:45 2014 +0100 @@ -39,6 +39,7 @@ * snippet specific metrics. */ public class SnippetCounter implements Comparable<SnippetCounter> { + private static final LocationIdentity SNIPPET_COUNTER_LOCATION = new NamedLocationIdentity("SnippetCounter"); /** * A group of related counters. @@ -134,9 +135,7 @@ */ public void inc() { if (group != null) { - // TODO: instead of ANY_LOCATION we should actually - // use the location for the field "value". - DirectObjectStoreNode.storeLong(this, countOffset(), 0, value + 1, LocationIdentity.ANY_LOCATION); + DirectObjectStoreNode.storeLong(this, countOffset(), 0, value + 1, SNIPPET_COUNTER_LOCATION); } }