Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java @ 15115:de406a971984
enhanced API for scoped overriding of the current DebugConfig
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 15 Apr 2014 15:37:35 +0200 |
parents | 288c23143d47 |
children | 0d296283e87d |
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java Tue Apr 15 13:34:29 2014 +0200 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java Tue Apr 15 15:37:35 2014 +0200 @@ -23,6 +23,7 @@ package com.oracle.graal.debug; import static com.oracle.graal.debug.Debug.Initialization.*; +import static com.oracle.graal.debug.DelegatingDebugConfig.Feature.*; import static java.util.FormattableFlags.*; import java.io.*; @@ -259,17 +260,7 @@ } public static Scope forceLog() { - return Debug.sandbox("forceLog", new DelegatingDebugConfig(DebugScope.getConfig()) { - @Override - public boolean isLogEnabled() { - return true; - } - - @Override - public boolean isLogEnabledForMethod() { - return true; - } - }); + return Debug.sandbox("forceLog", new DelegatingDebugConfig().enable(LOG).enable(LOG_METHOD)); } /**