public class GraalDebugConfig extends Object implements DebugConfig
Modifier and Type | Field and Description |
---|---|
static OptionValue<String> |
DebugValueSummary |
static OptionValue<String> |
DebugValueThreadFilter |
static OptionValue<String> |
Dump |
private DebugFilter |
dumpFilter |
private List<DebugDumpHandler> |
dumpHandlers |
static OptionValue<Boolean> |
DumpOnError |
private Set<Object> |
extraFilters |
static OptionValue<Boolean> |
InterceptBailout |
static OptionValue<String> |
Log |
private DebugFilter |
logFilter |
static OptionValue<Boolean> |
LogVerbose |
static OptionValue<String> |
Meter |
private DebugFilter |
meterFilter |
private MethodFilter[] |
methodFilter |
static OptionValue<String> |
MethodFilter |
static OptionValue<Boolean> |
MethodFilterRootOnly |
private PrintStream |
output |
static OptionValue<Boolean> |
SuppressZeroDebugValues |
static OptionValue<String> |
Time |
private DebugFilter |
timerFilter |
static OptionValue<String> |
TrackMemUse |
private DebugFilter |
trackMemUseFilter |
static OptionValue<String> |
Verify |
private DebugFilter |
verifyFilter |
private List<DebugVerifyHandler> |
verifyHandlers |
Constructor and Description |
---|
GraalDebugConfig(String logFilter,
String meterFilter,
String trackMemUseFilter,
String timerFilter,
String dumpFilter,
String verifyFilter,
String methodFilter,
PrintStream output,
List<DebugDumpHandler> dumpHandlers,
List<DebugVerifyHandler> verifyHandlers) |
Modifier and Type | Method and Description |
---|---|
private static void |
add(StringBuilder sb,
String name,
Object filter) |
void |
addToContext(Object o)
Adds an object the context used by this configuration to do filtering.
|
static boolean |
areDebugScopePatternsEnabled() |
static boolean |
areScopedMetricsOrTimersEnabled()
|
static JavaMethod |
asJavaMethod(Object context)
Extracts a
JavaMethod from an opaque debug context. |
private static boolean |
assertionsEnabled() |
private boolean |
checkMethodFilter() |
Collection<DebugDumpHandler> |
dumpHandlers()
Gets the modifiable collection of dump handlers registered with this configuration.
|
int |
getDumpLevel()
Determines the current dump level in the current debug
scope.
|
private int |
getLevel(DebugFilter filter) |
int |
getLogLevel()
Determines the current log level in the current debug scope
.
|
RuntimeException |
interceptException(Throwable e)
Handles notification of an exception occurring within a debug scope.
|
boolean |
isDumpEnabledForMethod()
Determines if dumping can be enabled in the current method, regardless of the
current debug scope.
|
private boolean |
isEnabled(DebugFilter filter) |
private boolean |
isEnabledForMethod(DebugFilter filter) |
boolean |
isLogEnabledForMethod()
Determines if logging can be enabled in the current method, regardless of the
current debug scope.
|
boolean |
isMemUseTrackingEnabled()
Determines if memory use tracking is enabled in the current
debug scope.
|
boolean |
isMeterEnabled()
Determines if metering is enabled in the current debug
scope.
|
(package private) static boolean |
isNotEmpty(OptionValue<String> option) |
boolean |
isTimeEnabled() |
boolean |
isVerifyEnabled() |
boolean |
isVerifyEnabledForMethod() |
PrintStream |
output() |
void |
removeFromContext(Object o)
Removes an object the context used by this configuration to do filtering.
|
String |
toString() |
Collection<DebugVerifyHandler> |
verifyHandlers()
Gets the modifiable collection of verify handlers registered with this configuration.
|
public static final OptionValue<String> Dump
public static final OptionValue<String> Meter
public static final OptionValue<String> Verify
public static final OptionValue<String> TrackMemUse
public static final OptionValue<String> Time
public static final OptionValue<String> Log
public static final OptionValue<String> MethodFilter
public static final OptionValue<Boolean> MethodFilterRootOnly
public static final OptionValue<String> DebugValueSummary
public static final OptionValue<Boolean> SuppressZeroDebugValues
public static final OptionValue<String> DebugValueThreadFilter
public static final OptionValue<Boolean> DumpOnError
public static final OptionValue<Boolean> InterceptBailout
public static final OptionValue<Boolean> LogVerbose
private final DebugFilter logFilter
private final DebugFilter meterFilter
private final DebugFilter trackMemUseFilter
private final DebugFilter timerFilter
private final DebugFilter dumpFilter
private final DebugFilter verifyFilter
private final MethodFilter[] methodFilter
private final List<DebugDumpHandler> dumpHandlers
private final List<DebugVerifyHandler> verifyHandlers
private final PrintStream output
private final Set<Object> extraFilters
public GraalDebugConfig(String logFilter, String meterFilter, String trackMemUseFilter, String timerFilter, String dumpFilter, String verifyFilter, String methodFilter, PrintStream output, List<DebugDumpHandler> dumpHandlers, List<DebugVerifyHandler> verifyHandlers)
private static boolean assertionsEnabled()
static boolean isNotEmpty(OptionValue<String> option)
public static boolean areDebugScopePatternsEnabled()
public static boolean areScopedMetricsOrTimersEnabled()
public int getLogLevel()
DebugConfig
getLogLevel
in interface DebugConfig
public boolean isLogEnabledForMethod()
DebugConfig
isLogEnabledForMethod
in interface DebugConfig
public boolean isMeterEnabled()
DebugConfig
isMeterEnabled
in interface DebugConfig
Debug.metric(CharSequence)
public boolean isMemUseTrackingEnabled()
DebugConfig
isMemUseTrackingEnabled
in interface DebugConfig
Debug.memUseTracker(CharSequence)
public int getDumpLevel()
DebugConfig
getDumpLevel
in interface DebugConfig
public boolean isDumpEnabledForMethod()
DebugConfig
isDumpEnabledForMethod
in interface DebugConfig
public boolean isVerifyEnabled()
isVerifyEnabled
in interface DebugConfig
Debug.isVerifyEnabled()
public boolean isVerifyEnabledForMethod()
isVerifyEnabledForMethod
in interface DebugConfig
Debug.isVerifyEnabledForMethod()
public boolean isTimeEnabled()
isTimeEnabled
in interface DebugConfig
Debug.timer(CharSequence)
public PrintStream output()
output
in interface DebugConfig
private boolean isEnabled(DebugFilter filter)
private int getLevel(DebugFilter filter)
private boolean isEnabledForMethod(DebugFilter filter)
public static JavaMethod asJavaMethod(Object context)
JavaMethod
from an opaque debug context.JavaMethod
represented by context
or nullprivate boolean checkMethodFilter()
private static void add(StringBuilder sb, String name, Object filter)
public RuntimeException interceptException(Throwable e)
DebugConfig
interceptException
in interface DebugConfig
null
indicates that e
is to be propagated.public Collection<DebugDumpHandler> dumpHandlers()
DebugConfig
dumpHandlers
in interface DebugConfig
public Collection<DebugVerifyHandler> verifyHandlers()
DebugConfig
verifyHandlers
in interface DebugConfig
public void addToContext(Object o)
DebugConfig
addToContext
in interface DebugConfig
public void removeFromContext(Object o)
DebugConfig
DebugConfig.addToContext(Object)
.removeFromContext
in interface DebugConfig