# HG changeset patch # User Bernhard Urban # Date 1395867165 -3600 # Node ID 365800f2a7aa660077dcd28a5bd5846d75d9cdb9 # Parent 5823c399e28f174b0232ac938603acc899f505ed SnippetCounter: use own location for counter diff -r 5823c399e28f -r 365800f2a7aa graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetCounter.java --- 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 { + 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); } }