annotate graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/DebugConfig.java @ 21742:2e850dbf82ae

Truffle-DSL: fix NPE in getImplicitCastType if an implicitely casted type is short circuited. (reported-by: Mohaned Qunaibit)
author Christian Humer <christian.humer@gmail.com>
date Fri, 05 Jun 2015 14:12:49 +0200
parents b1530a6cce8c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4357
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
4 *
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
8 *
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
13 * accompanied this code).
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
14 *
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
18 *
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
21 * questions.
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
22 */
21554
b1530a6cce8c renamed com.oracle.graal.[debug|options|hotspotvmconfig]* modules to com.oracle.jvmci.[debug|options|hotspotvmconfig]* modules (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 16463
diff changeset
23 package com.oracle.jvmci.debug;
4357
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24
5302
55bf72fafc41 (preliminary) logging to file (-G:LogFile=asdf.txt)
Lukas Stadler <lukas.stadler@jku.at>
parents: 5165
diff changeset
25 import java.io.*;
4363
7462c3600c3a Draft changes to the graph plotting.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4361
diff changeset
26 import java.util.*;
7462c3600c3a Draft changes to the graph plotting.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4361
diff changeset
27
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 6584
diff changeset
28 public interface DebugConfig {
4357
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
29
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
30 /**
16463
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
31 * Determines the current log level in the {@linkplain Debug#currentScope() current debug scope}
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
32 * .
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
33 */
16463
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
34 int getLogLevel();
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
35
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
36 /**
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
37 * Determines the current dump level in the {@linkplain Debug#currentScope() current debug
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
38 * scope}.
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
39 */
f1d839174e71 Support for specifying log and dump levels.
Roland Schatz <roland.schatz@oracle.com>
parents: 16144
diff changeset
40 int getDumpLevel();
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
41
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
42 /**
13323
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
43 * Determines if logging can be enabled in the current method, regardless of the
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
44 * {@linkplain Debug#currentScope() current debug scope}.
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
45 */
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
46 boolean isLogEnabledForMethod();
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
47
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
48 /**
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 6584
diff changeset
49 * Determines if metering is enabled in the {@linkplain Debug#currentScope() current debug
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 6584
diff changeset
50 * scope}.
14873
00eb80d735ed removed Debug.printf and added multi-arg versions of Debug.dump
Doug Simon <doug.simon@oracle.com>
parents: 14625
diff changeset
51 *
14586
d2fe05d5cc96 added support for lazy computation of names for use with Debug
Doug Simon <doug.simon@oracle.com>
parents: 13323
diff changeset
52 * @see Debug#metric(CharSequence)
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
53 */
4357
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
54 boolean isMeterEnabled();
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
55
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
56 /**
15581
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
57 * Determines if memory use tracking is enabled in the {@linkplain Debug#currentScope() current
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
58 * debug scope}.
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
59 *
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
60 * @see Debug#memUseTracker(CharSequence)
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
61 */
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
62 boolean isMemUseTrackingEnabled();
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
63
0dc0926cf0d8 added -G:TrackMemUse for measuring memory usage within scopes
Doug Simon <doug.simon@oracle.com>
parents: 14873
diff changeset
64 /**
13323
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
65 * Determines if dumping can be enabled in the current method, regardless of the
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
66 * {@linkplain Debug#currentScope() current debug scope}.
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
67 */
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
68 boolean isDumpEnabledForMethod();
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
69
48e821e409eb Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7530
diff changeset
70 /**
16144
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
71 * @see Debug#isVerifyEnabled()
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
72 */
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
73 boolean isVerifyEnabled();
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
74
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
75 /**
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
76 * @see Debug#isVerifyEnabledForMethod()
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
77 */
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
78 boolean isVerifyEnabledForMethod();
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
79
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
80 /**
5620
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
81 * Adds an object the context used by this configuration to do filtering.
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
82 */
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
83 void addToContext(Object o);
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
84
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
85 /**
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
86 * Removes an object the context used by this configuration to do filtering.
14873
00eb80d735ed removed Debug.printf and added multi-arg versions of Debug.dump
Doug Simon <doug.simon@oracle.com>
parents: 14625
diff changeset
87 *
5620
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
88 * This should only removes extra context added by {@link #addToContext(Object)}.
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
89 */
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
90 void removeFromContext(Object o);
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
91
2a44192a8b24 added support for extending the filtering context of a DebugConfig
Doug Simon <doug.simon@oracle.com>
parents: 5302
diff changeset
92 /**
14586
d2fe05d5cc96 added support for lazy computation of names for use with Debug
Doug Simon <doug.simon@oracle.com>
parents: 13323
diff changeset
93 * @see Debug#timer(CharSequence)
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
94 */
4394
cf609017d3d4 Fixed warnings.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4363
diff changeset
95 boolean isTimeEnabled();
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
96
6584
a3eb814ea564 added more javadoc to DebugConfig interface
Doug Simon <doug.simon@oracle.com>
parents: 5620
diff changeset
97 /**
a3eb814ea564 added more javadoc to DebugConfig interface
Doug Simon <doug.simon@oracle.com>
parents: 5620
diff changeset
98 * Handles notification of an exception occurring within a debug scope.
14873
00eb80d735ed removed Debug.printf and added multi-arg versions of Debug.dump
Doug Simon <doug.simon@oracle.com>
parents: 14625
diff changeset
99 *
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 6584
diff changeset
100 * @return the exception object that is to be propagated to parent scope. A value of
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 6584
diff changeset
101 * {@code null} indicates that {@code e} is to be propagated.
6584
a3eb814ea564 added more javadoc to DebugConfig interface
Doug Simon <doug.simon@oracle.com>
parents: 5620
diff changeset
102 */
4477
27c5466afd55 Changes to debug framework.
Andreas Woess <andreas.woess@jku.at>
parents: 4394
diff changeset
103 RuntimeException interceptException(Throwable e);
5165
1c7dd9bb16f9 documentation to show the relationship between DebugConfig and Debug
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
104
6584
a3eb814ea564 added more javadoc to DebugConfig interface
Doug Simon <doug.simon@oracle.com>
parents: 5620
diff changeset
105 /**
16144
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
106 * Gets the modifiable collection of dump handlers registered with this configuration.
6584
a3eb814ea564 added more javadoc to DebugConfig interface
Doug Simon <doug.simon@oracle.com>
parents: 5620
diff changeset
107 */
a3eb814ea564 added more javadoc to DebugConfig interface
Doug Simon <doug.simon@oracle.com>
parents: 5620
diff changeset
108 Collection<DebugDumpHandler> dumpHandlers();
5302
55bf72fafc41 (preliminary) logging to file (-G:LogFile=asdf.txt)
Lukas Stadler <lukas.stadler@jku.at>
parents: 5165
diff changeset
109
55bf72fafc41 (preliminary) logging to file (-G:LogFile=asdf.txt)
Lukas Stadler <lukas.stadler@jku.at>
parents: 5165
diff changeset
110 PrintStream output();
16144
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
111
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
112 /**
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
113 * Gets the modifiable collection of verify handlers registered with this configuration.
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
114 */
af9f3a5f091b extended Debug API with DebugVerifyHandlers
Doug Simon <doug.simon@oracle.com>
parents: 15581
diff changeset
115 Collection<DebugVerifyHandler> verifyHandlers();
4357
719ac1d92a52 More work on debug framework.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
116 }