comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Probe.java @ 19825:907128d02b31

Truffle/Instrumentation: For clients of Instrumentation, replace the TruffleEventListener interface with two: InstrumentListener, and ASTInstrumentListener. The former is simple, completely Truffle-safe (can't affect Truffle execution), and designed for simple tools. The latter is similar to the previous interface.
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Thu, 12 Mar 2015 18:03:05 -0700
parents 27fe86a6fb49
children e73096245a4c
comparison
equal deleted inserted replaced
19824:8b7a143aea6b 19825:907128d02b31
27 import java.lang.ref.*; 27 import java.lang.ref.*;
28 import java.util.*; 28 import java.util.*;
29 29
30 import com.oracle.truffle.api.*; 30 import com.oracle.truffle.api.*;
31 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; 31 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
32 import com.oracle.truffle.api.instrument.InstrumentationNode.TruffleEvents;
32 import com.oracle.truffle.api.nodes.*; 33 import com.oracle.truffle.api.nodes.*;
33 import com.oracle.truffle.api.source.*; 34 import com.oracle.truffle.api.source.*;
34 import com.oracle.truffle.api.utilities.*; 35 import com.oracle.truffle.api.utilities.*;
35 36
36 //TODO (mlvdv) migrate some of this to external documentation. 37 //TODO (mlvdv) migrate some of this to external documentation.
39 * Guest Language (GL) program (i.e. a {@link Node}) and a dynamically managed collection of 40 * Guest Language (GL) program (i.e. a {@link Node}) and a dynamically managed collection of
40 * "attached" {@linkplain Instrument instrumentation} for use by external tools. The instrumentation 41 * "attached" {@linkplain Instrument instrumentation} for use by external tools. The instrumentation
41 * is intended to persist at the location, even if the specific node instance is 42 * is intended to persist at the location, even if the specific node instance is
42 * {@linkplain Node#replace(Node) replaced}. 43 * {@linkplain Node#replace(Node) replaced}.
43 * <p> 44 * <p>
44 * The effect of a binding is to intercept {@linkplain TruffleEventListener execution events} 45 * The effect of a binding is to intercept {@linkplain TruffleEvents execution events} arriving at
45 * arriving at the node and notify each attached {@link Instrument} before execution is allowed to 46 * the node and notify each attached {@link Instrument} before execution is allowed to proceed to
46 * proceed to the child. 47 * the child.
47 * <p> 48 * <p>
48 * A Probe is "inserted" into a GL node via a call to {@link Node#probe()}. No more than one Probe 49 * A Probe is "inserted" into a GL node via a call to {@link Node#probe()}. No more than one Probe
49 * can be inserted at a node. 50 * can be inserted at a node.
50 * <p> 51 * <p>
51 * The "probing" of a Truffle AST must be done after it is complete (i.e. with parent pointers 52 * The "probing" of a Truffle AST must be done after it is complete (i.e. with parent pointers