# HG changeset patch # User Jaroslav Tulach # Date 1452250314 -3600 # Node ID 1133c68332ef0b66d0221bc5f4f81691c2009d0a # Parent 1f7fe9f4207a560a24697726ebafb0e89724c240 Compute the isProfilingEnabled information everytime to accomodate possible change in the Truffle runtime diff -r 1f7fe9f4207a -r 1133c68332ef truffle/com.oracle.truffle.api.profiles/src/com/oracle/truffle/api/profiles/Profile.java --- a/truffle/com.oracle.truffle.api.profiles/src/com/oracle/truffle/api/profiles/Profile.java Thu Jan 07 11:07:28 2016 +0100 +++ b/truffle/com.oracle.truffle.api.profiles/src/com/oracle/truffle/api/profiles/Profile.java Fri Jan 08 11:51:54 2016 +0100 @@ -91,8 +91,7 @@ * @see Assumption */ public abstract class Profile extends NodeCloneable { - private static final boolean ENABLED; - static { + static boolean isProfilingEnabled() { boolean enabled; try { enabled = Truffle.getRuntime().isProfilingEnabled(); @@ -100,11 +99,7 @@ // running on old version of Graal enabled = true; } - ENABLED = enabled; - } - - static boolean isProfilingEnabled() { - return ENABLED; + return enabled; } Profile() {