Mercurial > hg > truffle
annotate truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ProbeNode.java @ 22548:6b76a24fffbd default tip
Use all variables: a, b, u,v and x, y
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Thu, 14 Jan 2016 14:20:57 +0100 |
parents | 163fdf64587d |
children |
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; |
22214
3aad794eec0e
Truffle/Instrumentation: first large merge of instrumentation code into the TruffleVM framework
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22066
diff
changeset
|
29 import com.oracle.truffle.api.frame.VirtualFrame; |
22255
e7643754d982
Truffle/Instrumentation: rename Instrument to ProbeInstrument to distinguish from another kind to be added.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22227
diff
changeset
|
30 import com.oracle.truffle.api.instrument.ProbeInstrument.AbstractInstrumentNode; |
22256
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
31 import com.oracle.truffle.api.instrument.TagInstrument.AfterTagInstrument; |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
32 import com.oracle.truffle.api.instrument.TagInstrument.BeforeTagInstrument; |
22214
3aad794eec0e
Truffle/Instrumentation: first large merge of instrumentation code into the TruffleVM framework
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22066
diff
changeset
|
33 import com.oracle.truffle.api.nodes.Node; |
3aad794eec0e
Truffle/Instrumentation: first large merge of instrumentation code into the TruffleVM framework
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22066
diff
changeset
|
34 import com.oracle.truffle.api.nodes.NodeCost; |
3aad794eec0e
Truffle/Instrumentation: first large merge of instrumentation code into the TruffleVM framework
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22066
diff
changeset
|
35 import com.oracle.truffle.api.nodes.NodeInfo; |
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
|
36 |
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 /** |
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
|
38 * Implementation class & interface for enabling the attachment of {@linkplain Probe Probes} to |
22259
1348cc2e084e
Truffle/Instrumentation: javadoc
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22256
diff
changeset
|
39 * Truffle ASTs, part of the {@linkplain Instrumenter Instrumentation Framework}. |
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
|
40 * <p> |
22256
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
41 * A {@link ProbeNode} is the head of a chain of nodes acting on behalf of |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
42 * {@linkplain ProbeInstrument instruments}. It is attached to an AST as a child of a |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
43 * guest-language-specific {@link WrapperNode} node. |
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
|
44 * <p> |
22256
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
45 * When Truffle clones an AST, the chain, including all attached {@linkplain ProbeInstrument |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
46 * instruments} will be cloned along with the {@link WrapperNode} to which it is attached. An |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
47 * instance of {@link Probe} represents abstractly the instrumentation at a particular location in a |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
48 * Guest Language AST, tracks the clones of the chain, and keeps the instrumentation attached to the |
20961
21298b90a6bf
Truffle/Instrumentation: Javadoc cleanup
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
20104
diff
changeset
|
49 * 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
|
50 */ |
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
|
51 @NodeInfo(cost = NodeCost.NONE) |
22226
c896a8e70777
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22220
diff
changeset
|
52 final class ProbeNode extends EventHandlerNode { |
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
|
53 |
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
|
54 // 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
|
55 @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
|
56 /** |
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
|
57 * 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
|
58 */ |
20104
d7c48ee7ed4b
Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
19869
diff
changeset
|
59 @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
|
60 |
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
|
61 @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
|
62 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
|
63 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
|
64 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
|
65 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
|
66 } |
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
|
67 |
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
|
68 /** |
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 * @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
|
70 */ |
22226
c896a8e70777
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22220
diff
changeset
|
71 @Override |
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
|
72 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
|
73 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
|
74 } |
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
|
75 |
22226
c896a8e70777
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22220
diff
changeset
|
76 @Override |
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
|
77 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
|
78 this.probe.checkProbeUnchanged(); |
22256
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
79 final BeforeTagInstrument beforeTagInstrument = probe.getBeforeTagInstrument(); |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
80 if (beforeTagInstrument != null) { |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
81 beforeTagInstrument.getListener().onEnter(probe, ((WrapperNode) this.getParent()).getChild(), 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
|
82 } |
20104
d7c48ee7ed4b
Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
19869
diff
changeset
|
83 if (firstInstrumentNode != null) { |
d7c48ee7ed4b
Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
19869
diff
changeset
|
84 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
|
85 } |
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
|
86 } |
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
|
87 |
22226
c896a8e70777
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22220
diff
changeset
|
88 @Override |
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
|
89 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
|
90 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
|
91 if (firstInstrumentNode != null) { |
d7c48ee7ed4b
Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
19869
diff
changeset
|
92 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
|
93 } |
22256
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
94 final AfterTagInstrument afterTagInstrument = probe.getAfterTagInstrument(); |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
95 if (afterTagInstrument != null) { |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
96 afterTagInstrument.getListener().onReturnVoid(probe, ((WrapperNode) this.getParent()).getChild(), vFrame); |
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
|
97 } |
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
|
98 } |
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
|
99 |
22226
c896a8e70777
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22220
diff
changeset
|
100 @Override |
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
|
101 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
|
102 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
|
103 if (firstInstrumentNode != null) { |
d7c48ee7ed4b
Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
19869
diff
changeset
|
104 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
|
105 } |
22256
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
106 final AfterTagInstrument afterTagInstrument = probe.getAfterTagInstrument(); |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
107 if (afterTagInstrument != null) { |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
108 afterTagInstrument.getListener().onReturnValue(probe, ((WrapperNode) this.getParent()).getChild(), vFrame, result); |
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
|
109 } |
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
|
110 } |
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
|
111 |
22226
c896a8e70777
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22220
diff
changeset
|
112 @Override |
22336
5e37933270b0
Change signature of EventHandlerNode.returnExceptional to accept Throwable
Andreas Woess <andreas.woess@oracle.com>
parents:
22259
diff
changeset
|
113 public void returnExceptional(Node node, VirtualFrame vFrame, Throwable exception) { |
22343
76f80b4b48bc
Truffle/Instrumentation: language-specific WrapperNode classes are no longer required to explicitly propagate KillException or QuitException.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22336
diff
changeset
|
114 if (exception instanceof KillException) { |
76f80b4b48bc
Truffle/Instrumentation: language-specific WrapperNode classes are no longer required to explicitly propagate KillException or QuitException.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22336
diff
changeset
|
115 throw (KillException) exception; |
76f80b4b48bc
Truffle/Instrumentation: language-specific WrapperNode classes are no longer required to explicitly propagate KillException or QuitException.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22336
diff
changeset
|
116 } |
76f80b4b48bc
Truffle/Instrumentation: language-specific WrapperNode classes are no longer required to explicitly propagate KillException or QuitException.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22336
diff
changeset
|
117 if (exception instanceof QuitException) { |
76f80b4b48bc
Truffle/Instrumentation: language-specific WrapperNode classes are no longer required to explicitly propagate KillException or QuitException.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22336
diff
changeset
|
118 throw (QuitException) exception; |
76f80b4b48bc
Truffle/Instrumentation: language-specific WrapperNode classes are no longer required to explicitly propagate KillException or QuitException.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22336
diff
changeset
|
119 } |
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
|
120 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
|
121 if (firstInstrumentNode != null) { |
d7c48ee7ed4b
Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
19869
diff
changeset
|
122 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
|
123 } |
22256
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
124 final AfterTagInstrument afterTagInstrument = probe.getAfterTagInstrument(); |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
125 if (afterTagInstrument != null) { |
75e5db92973a
TruffleInstrumentation: fold the "TagTrap" mechanism into the general framework of Instruments, Listeners, and management via Instrumenter.attach() methods.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22255
diff
changeset
|
126 afterTagInstrument.getListener().onReturnExceptional(probe, ((WrapperNode) this.getParent()).getChild(), vFrame, exception); |
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
|
127 } |
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
|
128 } |
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 |
22226
c896a8e70777
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22220
diff
changeset
|
130 @Override |
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
|
131 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
|
132 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
|
133 } |
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
|
134 |
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 /** |
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
|
136 * 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
|
137 */ |
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
|
138 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
|
139 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
|
140 } |
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
|
141 |
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
|
142 /** |
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
|
143 * 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
|
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 @TruffleBoundary |
22255
e7643754d982
Truffle/Instrumentation: rename Instrument to ProbeInstrument to distinguish from another kind to be added.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22227
diff
changeset
|
146 void addInstrument(ProbeInstrument instrument) { |
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
|
147 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
|
148 // 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
|
149 // 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
|
150 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
|
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 /** |
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 * 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
|
155 * |
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
|
156 * @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
|
157 */ |
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
|
158 @TruffleBoundary |
22255
e7643754d982
Truffle/Instrumentation: rename Instrument to ProbeInstrument to distinguish from another kind to be added.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
22227
diff
changeset
|
159 void removeInstrument(ProbeInstrument instrument) { |
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
|
160 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
|
161 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
|
162 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
|
163 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
|
164 } else { |
20104
d7c48ee7ed4b
Truffle/Instrumentation: field renaming in ProbeNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
19869
diff
changeset
|
165 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
|
166 } |
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
|
167 } |
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
|
168 |
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
|
169 } |