annotate truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ProbeNode.java @ 22157:dc83cc1f94f2

Using fully qualified imports
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Wed, 16 Sep 2015 11:33:22 +0200
parents 78c3d3d8d86e
children 1c0f490984d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
1 /*
18985
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
4 *
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation. Oracle designates this
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
8 * particular file as subject to the "Classpath" exception as provided
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
9 * by Oracle in the LICENSE file that accompanied this code.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
10 *
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
11 * This code is distributed in the hope that it will be useful, but WITHOUT
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
14 * version 2 for more details (a copy is included in the LICENSE file that
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
15 * accompanied this code).
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
16 *
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License version
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
18 * 2 along with this work; if not, write to the Free Software Foundation,
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
20 *
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
22 * or visit www.oracle.com if you need additional information or have any
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
23 * questions.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
24 */
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
25 package com.oracle.truffle.api.instrument;
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
26
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
27 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
28 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
22003
5bc7f7b867ab Making debugger always on for each TruffleVM execution. Introducing EventConsumer to process such debugger events. Requesting each RootNode to be associated with a TruffleLanguage, so debugger can find out proper context for each Node where executions gets suspended.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
29 import com.oracle.truffle.api.TruffleLanguage;
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22066
diff changeset
30 import com.oracle.truffle.api.frame.VirtualFrame;
19818
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19490
diff changeset
31 import com.oracle.truffle.api.instrument.Instrument.AbstractInstrumentNode;
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19490
diff changeset
32 import com.oracle.truffle.api.instrument.InstrumentationNode.TruffleEvents;
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22066
diff changeset
33 import com.oracle.truffle.api.nodes.Node;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22066
diff changeset
34 import com.oracle.truffle.api.nodes.NodeCost;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22066
diff changeset
35 import com.oracle.truffle.api.nodes.NodeInfo;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22066
diff changeset
36 import com.oracle.truffle.api.source.SourceSection;
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
37
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
38 /**
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
39 * Implementation class & interface for enabling the attachment of {@linkplain Probe Probes} to
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
40 * Truffle ASTs.
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
41 * <p>
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
42 * A {@link ProbeNode} is the head of a chain of nodes acting on behalf of {@linkplain Instrument
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
43 * instruments}. It is attached to an AST as a child of a guest-language-specific
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
44 * {@link WrapperNode} node.
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
45 * <p>
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
46 * When Truffle clones an AST, the chain, including all attached {@linkplain Instrument instruments}
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
47 * will be cloned along with the {@link WrapperNode} to which it is attached. An instance of
20961
21298b90a6bf Truffle/Instrumentation: Javadoc cleanup
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20104
diff changeset
48 * {@link Probe} represents abstractly the instrumentation at a particular location in a Guest
21298b90a6bf Truffle/Instrumentation: Javadoc cleanup
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20104
diff changeset
49 * Language AST, tracks the clones of the chain, and keeps the instrumentation attached to the
21298b90a6bf Truffle/Instrumentation: Javadoc cleanup
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20104
diff changeset
50 * clones consistent.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
51 */
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
52 @NodeInfo(cost = NodeCost.NONE)
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
53 public final class ProbeNode extends Node implements TruffleEvents, InstrumentationNode {
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
54
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
55 /**
18985
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
56 * A node that can be inserted into a Truffle AST, and which enables {@linkplain Instrument
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
57 * instrumentation} at a particular Guest Language (GL) node. Implementations must extend
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
58 * {@link Node} and should override {@link Node#isInstrumentable()} to return {@code false}.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
59 * <p>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
60 * The implementation must be GL-specific. A wrapper <em>decorates</em> a GL AST node (the
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
61 * wrapper's <em>child</em>) by acting as a transparent <em>proxy</em> with respect to the GL's
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
62 * execution semantics.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
63 * <p>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
64 * Instrumentation at the wrapped node is implemented by an instance of {@link ProbeNode}
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
65 * attached as a second child of the {@link WrapperNode}.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
66 * <p>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
67 * A wrapper is obliged to notify its attached {@link ProbeNode} when execution events occur at
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
68 * the wrapped AST node during program execution.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
69 * <p>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
70 * When a GL AST is cloned, the {@link WrapperNode}, its {@link ProbeNode} and any
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
71 * {@linkplain Instrument instrumentation} are also cloned; they are in effect part of the GL
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
72 * AST. An instance of {@link Probe} represents abstractly the instrumentation at a particular
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
73 * location in a GL AST; it tracks all the copies of the Wrapper and attached instrumentation,
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
74 * and acts as a single point of access for tools.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
75 * <p>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
76 * This interface is not intended to be visible as part of the API for tools (instrumentation
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
77 * clients).
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
78 * <p>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
79 * Implementation guidelines:
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
80 * <ol>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
81 * <li>Each GL implementation should include a WrapperNode implementation; usually only one is
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
82 * needed.</li>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
83 * <li>The wrapper type should descend from the <em>GL-specific node class</em>.</li>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
84 * <li>Must have a field: {@code @Child private <GL>Node child;}</li>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
85 * <li>Must have a field: {@code @Child private ProbeNode probeNode;}</li>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
86 * <li>The wrapper must act as a <em>proxy</em> for its child, which means implementing every
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
87 * possible <em>execute-</em> method that gets called on guest language AST node types by their
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
88 * parents, and passing along each call to its child.</li>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
89 * <li>Method {@code Probe getProbe()} should be implemented as {@code probeNode.getProbe();}
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
90 * <li>Method {@code insertProbe(ProbeNode)} should be implemented as
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
91 * {@code this.probeNode=insert(newProbeNode);}</li>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
92 * <li>Most importantly, Wrappers must be implemented so that Truffle optimization will reduce
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
93 * their runtime overhead to zero when there are no attached {@link Instrument}s.</li>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
94 * </ol>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
95 * <p>
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
96 *
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
97 * @see Instrument
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
98 */
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
99 public interface WrapperNode extends InstrumentationNode {
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
100
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
101 /**
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
102 * Gets the node being "wrapped", i.e. the AST node for which
19818
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19490
diff changeset
103 * {@linkplain InstrumentationNode.TruffleEvents execution events} will be reported through
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19490
diff changeset
104 * the Instrumentation Framework.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
105 */
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
106 Node getChild();
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
107
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
108 /**
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
109 * Gets the {@link Probe} responsible for installing this wrapper.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
110 */
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
111 Probe getProbe();
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
112
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
113 /**
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
114 * Implementation support for completing a newly created wrapper node.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
115 */
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
116 void insertProbe(ProbeNode probeNode);
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
117 }
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
118
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
119 /**
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
120 * Create a new {@link Probe} associated with, and attached to, a Guest Language specific
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
121 * instance of {@link WrapperNode}.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
122 */
22066
78c3d3d8d86e Clearly separating the TruffleLanguage definition from context used during its execution. TruffleLanguage now has to have public static field INSTANCE and override createContext method.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
123 @SuppressWarnings("rawtypes")
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
124 public static Probe insertProbe(WrapperNode wrapper) {
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
125 final SourceSection sourceSection = wrapper.getChild().getSourceSection();
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
126 final ProbeNode probeNode = new ProbeNode(); // private constructor
22003
5bc7f7b867ab Making debugger always on for each TruffleVM execution. Introducing EventConsumer to process such debugger events. Requesting each RootNode to be associated with a TruffleLanguage, so debugger can find out proper context for each Node where executions gets suspended.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
127 Class<? extends TruffleLanguage> l = Probe.ACCESSOR.findLanguage(wrapper.getChild().getRootNode());
5bc7f7b867ab Making debugger always on for each TruffleVM execution. Introducing EventConsumer to process such debugger events. Requesting each RootNode to be associated with a TruffleLanguage, so debugger can find out proper context for each Node where executions gets suspended.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
128 probeNode.probe = new Probe(l, probeNode, sourceSection); // package private access
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
129 wrapper.insertProbe(probeNode);
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
130 return probeNode.probe;
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
131 }
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
132
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
133 // Never changed once set.
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
134 @CompilationFinal Probe probe = null;
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
135 /**
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
136 * First {@link AbstractInstrumentNode} node in chain; {@code null} of no instruments in chain.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
137 */
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
138 @Child protected AbstractInstrumentNode firstInstrumentNode;
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
139
18985
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
140 @Override
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
141 public boolean isInstrumentable() {
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
142 return false;
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
143 }
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
144
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
145 @Override
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
146 public Node copy() {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
147 Node node = super.copy();
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
148 probe.registerProbeNodeClone((ProbeNode) node);
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
149 return node;
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
150 }
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
151
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
152 /**
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
153 * @return the {@link Probe} permanently associated with this {@link ProbeNode}.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
154 */
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
155 public Probe getProbe() {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
156 return probe;
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
157 }
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
158
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
159 public void enter(Node node, VirtualFrame vFrame) {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
160 this.probe.checkProbeUnchanged();
21131
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
161 final SyntaxTagTrap beforeTagTrap = probe.getBeforeTrap();
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
162 if (beforeTagTrap != null) {
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
163 beforeTagTrap.tagTrappedAt(((WrapperNode) this.getParent()).getChild(), vFrame.materialize());
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
164 }
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
165 if (firstInstrumentNode != null) {
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
166 firstInstrumentNode.enter(node, vFrame);
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
167 }
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
168 }
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
169
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
170 public void returnVoid(Node node, VirtualFrame vFrame) {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
171 this.probe.checkProbeUnchanged();
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
172 if (firstInstrumentNode != null) {
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
173 firstInstrumentNode.returnVoid(node, vFrame);
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
174 }
21131
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
175 final SyntaxTagTrap afterTagTrap = probe.getAfterTrap();
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
176 if (afterTagTrap != null) {
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
177 afterTagTrap.tagTrappedAt(((WrapperNode) this.getParent()).getChild(), vFrame.materialize());
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
178 }
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
179 }
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
180
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
181 public void returnValue(Node node, VirtualFrame vFrame, Object result) {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
182 this.probe.checkProbeUnchanged();
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
183 if (firstInstrumentNode != null) {
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
184 firstInstrumentNode.returnValue(node, vFrame, result);
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
185 }
21131
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
186 final SyntaxTagTrap afterTagTrap = probe.getAfterTrap();
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
187 if (afterTagTrap != null) {
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
188 afterTagTrap.tagTrappedAt(((WrapperNode) this.getParent()).getChild(), vFrame.materialize());
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
189 }
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
190 }
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
191
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
192 public void returnExceptional(Node node, VirtualFrame vFrame, Exception exception) {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
193 this.probe.checkProbeUnchanged();
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
194 if (firstInstrumentNode != null) {
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
195 firstInstrumentNode.returnExceptional(node, vFrame, exception);
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
196 }
21131
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
197 final SyntaxTagTrap afterTagTrap = probe.getAfterTrap();
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
198 if (afterTagTrap != null) {
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
199 afterTagTrap.tagTrappedAt(((WrapperNode) this.getParent()).getChild(), vFrame.materialize());
d6d9631eb057 TruffleInstrumentation: rename Probe.setTagTrap() to Probe.setBeforeTagTrap() and add Probe.setAfterTagTrap()
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 20961
diff changeset
200 }
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
201 }
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
202
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
203 public String instrumentationInfo() {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
204 return "Standard probe";
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
205 }
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
206
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
207 /**
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21131
diff changeset
208 * Gets the guest-language AST node to which this Probe is attached.
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21131
diff changeset
209 */
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21131
diff changeset
210 Node getProbedNode() {
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21131
diff changeset
211 return ((WrapperNode) this.getParent()).getChild();
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21131
diff changeset
212 }
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21131
diff changeset
213
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21131
diff changeset
214 /**
19818
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19490
diff changeset
215 * Adds an {@link AbstractInstrumentNode} to this chain.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
216 */
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
217 @TruffleBoundary
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
218 void addInstrument(Instrument instrument) {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
219 assert instrument.getProbe() == probe;
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
220 // The existing chain of nodes may be empty
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
221 // Attach the modified chain.
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
222 firstInstrumentNode = insert(instrument.addToChain(firstInstrumentNode));
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
223 }
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
224
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
225 /**
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
226 * Removes an instrument from this chain of instruments.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
227 *
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
228 * @throws RuntimeException if no matching instrument is found,
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
229 */
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
230 @TruffleBoundary
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
231 void removeInstrument(Instrument instrument) {
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
232 assert instrument.getProbe() == probe;
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
233 final AbstractInstrumentNode modifiedChain = instrument.removeFromChain(firstInstrumentNode);
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
234 if (modifiedChain == null) {
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
235 firstInstrumentNode = null;
19869
1d6a7ea5de59 Truffle/Instrumentation: remove support for "probe-lite", an optimization for a particular use case that no longer seems worth the complexity.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19818
diff changeset
236 } else {
20104
d7c48ee7ed4b Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 19869
diff changeset
237 firstInstrumentNode = insert(modifiedChain);
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
238 }
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
239 }
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
240
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
241 }