Mercurial > hg > truffle
diff truffle/com.oracle.truffle.api.profiles/src/com/oracle/truffle/api/profiles/LongValueProfile.java @ 22504:d80a5ff56f51
Storing the profiling enabled information in a static field; checking it only once; shielding against missing method in the TruffleRuntime interface
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Thu, 17 Dec 2015 13:45:37 +0100 |
parents | 828c67903db2 |
children |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api.profiles/src/com/oracle/truffle/api/profiles/LongValueProfile.java Thu Dec 17 10:01:38 2015 +0100 +++ b/truffle/com.oracle.truffle.api.profiles/src/com/oracle/truffle/api/profiles/LongValueProfile.java Thu Dec 17 13:45:37 2015 +0100 @@ -26,7 +26,6 @@ import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; -import com.oracle.truffle.api.Truffle; /** * <p> @@ -72,7 +71,7 @@ * @see LongValueProfile */ public static LongValueProfile createIdentityProfile() { - if (Truffle.getRuntime().isProfilingEnabled()) { + if (Profile.isProfilingEnabled()) { return Enabled.create(); } else { return Disabled.INSTANCE;