# HG changeset patch # User Michael Van De Vanter # Date 1428724826 25200 # Node ID 73b1844b5b141f5eecd3ac4a27b5a2649350ad42 # Parent 0f3d81231ecbaf6ebf434eb0651ae60f2ba96ab2 Truffle/Instrumentation: rename InstrumentListener to SimpleInstrumentListener diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/InstrumentationPartialEvaluationTest.java --- a/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/InstrumentationPartialEvaluationTest.java Fri Apr 10 17:56:10 2015 -0700 +++ b/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/InstrumentationPartialEvaluationTest.java Fri Apr 10 21:00:26 2015 -0700 @@ -67,7 +67,7 @@ RootTestNode root = new RootTestNode(fd, "constantValue", result); root.adoptChildren(); Probe probe = result.probe(); - Instrument instrument = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument"); + Instrument instrument = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument"); probe.attach(instrument); assertPartialEvalEquals("constant42", root); } @@ -91,7 +91,7 @@ RootTestNode root = new RootTestNode(fd, "constantValue", result); root.adoptChildren(); Probe probe = result.probe(); - Instrument instrument = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument"); + Instrument instrument = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument"); probe.attach(instrument); instrument.dispose(); assertPartialEvalEquals("constant42", root); @@ -117,9 +117,9 @@ RootTestNode root = new RootTestNode(fd, "constantValue", result); root.adoptChildren(); Probe probe = result.probe(); - Instrument instrument1 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 1"); + Instrument instrument1 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 1"); probe.attach(instrument1); - Instrument instrument2 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 2"); + Instrument instrument2 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 2"); probe.attach(instrument2); assertPartialEvalEquals("constant42", root); } @@ -145,11 +145,11 @@ RootTestNode root = new RootTestNode(fd, "constantValue", result); root.adoptChildren(); Probe probe = result.probe(); - Instrument instrument1 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 1"); + Instrument instrument1 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 1"); probe.attach(instrument1); - Instrument instrument2 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 2"); + Instrument instrument2 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 2"); probe.attach(instrument2); - Instrument instrument3 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 3"); + Instrument instrument3 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 3"); probe.attach(instrument3); assertPartialEvalEquals("constant42", root); } @@ -177,11 +177,11 @@ RootTestNode root = new RootTestNode(fd, "constantValue", result); root.adoptChildren(); Probe probe = result.probe(); - Instrument instrument1 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 1"); + Instrument instrument1 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 1"); probe.attach(instrument1); - Instrument instrument2 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 2"); + Instrument instrument2 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 2"); probe.attach(instrument2); - Instrument instrument3 = Instrument.create(new DefaultInstrumentListener(), "Null test Instrument 3"); + Instrument instrument3 = Instrument.create(new DefaultSimpleInstrumentListener(), "Null test Instrument 3"); probe.attach(instrument3); instrument2.dispose(); assertPartialEvalEquals("constant42", root); @@ -280,7 +280,7 @@ Assert.assertEquals(0, count[0]); // Didn't count anything // Add a counting instrument; this changes the "Probe state" and should cause a deopt - final Instrument countingInstrument = Instrument.create(new DefaultInstrumentListener() { + final Instrument countingInstrument = Instrument.create(new DefaultSimpleInstrumentListener() { @Override public void enter(Probe p) { diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTest.java --- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTest.java Fri Apr 10 17:56:10 2015 -0700 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTest.java Fri Apr 10 21:00:26 2015 -0700 @@ -177,7 +177,7 @@ // Check instrumentation with the simplest kind of counters. // They should all be removed when the check is finished. - checkCounters(probe, callTarget, rootNode, new TestInstrumentCounter(), new TestInstrumentCounter(), new TestInstrumentCounter()); + checkCounters(probe, callTarget, rootNode, new TestSimpleInstrumentCounter(), new TestSimpleInstrumentCounter(), new TestSimpleInstrumentCounter()); // Now try with the more complex flavor of listener checkCounters(probe, callTarget, rootNode, new TestASTInstrumentCounter(), new TestASTInstrumentCounter(), new TestASTInstrumentCounter()); @@ -353,14 +353,14 @@ /** * A counter for the number of times execution enters and leaves a probed AST node. */ - private class TestInstrumentCounter implements TestCounter { + private class TestSimpleInstrumentCounter implements TestCounter { public int enterCount = 0; public int leaveCount = 0; public final Instrument instrument; - public TestInstrumentCounter() { - this.instrument = Instrument.create(new InstrumentListener() { + public TestSimpleInstrumentCounter() { + this.instrument = Instrument.create(new SimpleInstrumentListener() { public void enter(Probe probe) { enterCount++; @@ -485,7 +485,7 @@ /** * Counts the number of "enter" events at probed nodes using the simplest AST listener. */ - static final class TestInstrumentListener extends DefaultInstrumentListener { + static final class TestSimpleInstrumentListener extends DefaultSimpleInstrumentListener { public int counter = 0; @@ -522,7 +522,7 @@ // where we want to count executions. // it will get copied when ASTs cloned, so // keep the count in this outer class. - probe.attach(Instrument.create(new DefaultInstrumentListener() { + probe.attach(Instrument.create(new DefaultSimpleInstrumentListener() { @Override public void enter(Probe p) { diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ASTInstrumentListener.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ASTInstrumentListener.java Fri Apr 10 17:56:10 2015 -0700 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ASTInstrumentListener.java Fri Apr 10 21:00:26 2015 -0700 @@ -36,7 +36,7 @@ *

* This listener is designed for clients that also require access to the AST execution state at the * time of the event. Clients that do not require access to the AST execution state should use the - * simpler {@link InstrumentListener}. + * {@link SimpleInstrumentListener}. *

* Clients are free, of course, to record additional information in the listener implementation that * carries additional information about the context and reason for the particular {@link Instrument} diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java Fri Apr 10 17:56:10 2015 -0700 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java Fri Apr 10 21:00:26 2015 -0700 @@ -41,7 +41,7 @@ * and a listener, which consumes notifications on behalf of an external tool. There are at * present two kinds of listeners that be used: *

    - *
  1. {@link InstrumentListener} is the simplest and is intended for tools that require no access + *
  2. {@link SimpleInstrumentListener} is the simplest and is intended for tools that require no access * to the internal execution state of the Truffle execution, only that execution has passed * through a particular location in the program. Information about that location is made available * via the {@link Probe} argument in notification methods, including the {@linkplain SourceSection @@ -57,7 +57,7 @@ *
      *
    1. Create an implementation of a listener interface.
    2. *
    3. Create an Instrument via factory methods - * {@link Instrument#create(InstrumentListener, String)} or + * {@link Instrument#create(SimpleInstrumentListener, String)} or * {@link Instrument#create(ASTInstrumentListener, String)}.
    4. *
    5. "Attach" the Instrument to a Probe via {@link Probe#attach(Instrument)}, at which point event * notifications begin to arrive at the listener.
    6. @@ -68,17 +68,17 @@ *

      Options for creating listeners:

      *

      *

        - *
      1. Implement one of the listener interfaces: {@link InstrumentListener} or + *
      2. Implement one of the listener interfaces: {@link SimpleInstrumentListener} or * {@link ASTInstrumentListener} . Their event handling methods account for both the entry into an * AST node (about to call) and three possible kinds of execution return from an AST node.
      3. - *
      4. Extend one of the helper implementations: {@link DefaultInstrumentListener} or + *
      5. Extend one of the helper implementations: {@link DefaultSimpleInstrumentListener} or * {@link DefaultASTInstrumentListener}. These provide no-op implementation of every listener * method, so only the methods of interest need to be overridden.
      6. *
      *

      *

      General guidelines for {@link ASTInstrumentListener} implementation:

      *

      - * Unlike the listener interface {@link InstrumentListener}, which isolates implementations + * Unlike the listener interface {@link SimpleInstrumentListener}, which isolates implementations * completely from Truffle internals (and is thus Truffle-safe), implementations of * {@link ASTInstrumentListener} can interact directly with (and potentially affect) Truffle * execution in general and Truffle optimization in particular. For example, it is possible to @@ -110,7 +110,7 @@ *

      Allowing for AST cloning:

      *

      * Truffle routinely clones ASTs, which has consequences for implementations of - * {@link ASTInstrumentListener} (but not for implementations of {@link InstrumentListener}, from + * {@link ASTInstrumentListener} (but not for implementations of {@link SimpleInstrumentListener}, from * which cloning is hidden). *

        *
      • Even though a {@link Probe} is uniquely associated with a particular location in the @@ -173,8 +173,8 @@ * @param instrumentInfo optional description of the instrument's role, useful for debugging. * @return a new instrument, ready for attachment at a probe */ - public static Instrument create(InstrumentListener listener, String instrumentInfo) { - return new BasicInstrument(listener, instrumentInfo); + public static Instrument create(SimpleInstrumentListener listener, String instrumentInfo) { + return new SimpleInstrument(listener, instrumentInfo); } /** @@ -262,23 +262,23 @@ abstract AbstractInstrumentNode addToChain(AbstractInstrumentNode nextNode); /** - * An instrument that propagates events to an instance of {@link InstrumentListener}. + * An instrument that propagates events to an instance of {@link SimpleInstrumentListener}. */ - private static final class BasicInstrument extends Instrument { + private static final class SimpleInstrument extends Instrument { /** * Tool-supplied listener for events. */ - private final InstrumentListener instrumentListener; + private final SimpleInstrumentListener simpleListener; - private BasicInstrument(InstrumentListener basicListener, String instrumentInfo) { + private SimpleInstrument(SimpleInstrumentListener simpleListener, String instrumentInfo) { super(instrumentInfo); - this.instrumentListener = basicListener; + this.simpleListener = simpleListener; } @Override AbstractInstrumentNode addToChain(AbstractInstrumentNode nextNode) { - return new BasicInstrumentNode(nextNode); + return new SimpleInstrumentNode(nextNode); } @Override @@ -290,7 +290,7 @@ return instrumentNode.nextInstrumentNode; } // Match not at the head of the chain; remove it. - found = instrumentNode.removeFromChain(BasicInstrument.this); + found = instrumentNode.removeFromChain(SimpleInstrument.this); } if (!found) { throw new IllegalStateException("Couldn't find instrument node to remove: " + this); @@ -299,35 +299,35 @@ } @NodeInfo(cost = NodeCost.NONE) - private final class BasicInstrumentNode extends AbstractInstrumentNode { + private final class SimpleInstrumentNode extends AbstractInstrumentNode { - private BasicInstrumentNode(AbstractInstrumentNode nextNode) { + private SimpleInstrumentNode(AbstractInstrumentNode nextNode) { super(nextNode); } public void enter(Node node, VirtualFrame vFrame) { - BasicInstrument.this.instrumentListener.enter(BasicInstrument.this.probe); + SimpleInstrument.this.simpleListener.enter(SimpleInstrument.this.probe); if (nextInstrumentNode != null) { nextInstrumentNode.enter(node, vFrame); } } public void returnVoid(Node node, VirtualFrame vFrame) { - BasicInstrument.this.instrumentListener.returnVoid(BasicInstrument.this.probe); + SimpleInstrument.this.simpleListener.returnVoid(SimpleInstrument.this.probe); if (nextInstrumentNode != null) { nextInstrumentNode.returnVoid(node, vFrame); } } public void returnValue(Node node, VirtualFrame vFrame, Object result) { - BasicInstrument.this.instrumentListener.returnValue(BasicInstrument.this.probe, result); + SimpleInstrument.this.simpleListener.returnValue(SimpleInstrument.this.probe, result); if (nextInstrumentNode != null) { nextInstrumentNode.returnValue(node, vFrame, result); } } public void returnExceptional(Node node, VirtualFrame vFrame, Exception exception) { - BasicInstrument.this.instrumentListener.returnExceptional(BasicInstrument.this.probe, exception); + SimpleInstrument.this.simpleListener.returnExceptional(SimpleInstrument.this.probe, exception); if (nextInstrumentNode != null) { nextInstrumentNode.returnExceptional(node, vFrame, exception); } @@ -335,7 +335,7 @@ public String instrumentationInfo() { final String info = getInstrumentInfo(); - return info != null ? info : instrumentListener.getClass().getSimpleName(); + return info != null ? info : simpleListener.getClass().getSimpleName(); } } } diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/InstrumentListener.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/InstrumentListener.java Fri Apr 10 17:56:10 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.truffle.api.instrument; - -import com.oracle.truffle.api.source.*; - -/** - * A receiver of Truffle execution events that can act on behalf of an external client. - *

        - * The {@link Probe} instance provides access to the {@link SourceSection} associated with the - * event, as well as any {@link SyntaxTag}s that have been applied at that program's location. - *

        - * This is the simplest kind of listener, suitable for clients that need no other information about - * the program's execution state at the time of the event. Clients that require access to the AST - * execution state should use {@link ASTInstrumentListener}. - *

        - * Clients are free, of course, to record additional information in the listener implementation that - * carries additional information about the context and reason for the particular {@link Instrument} - * that is to be created from the listener. - */ -public interface InstrumentListener { - - /** - * Receive notification that a program location is about to be executed. - *

        - * Synchronous: Truffle execution waits until the call returns. - */ - void enter(Probe probe); - - /** - * Receive notification that a program location's {@code void}-valued execution has just - * completed. - *

        - * Synchronous: Truffle execution waits until the call returns. - */ - void returnVoid(Probe probe); - - /** - * Receive notification that a program location's execution has just completed and returned a - * value (boxed if primitive). - *

        - * Synchronous: Truffle execution waits until the call returns. - */ - void returnValue(Probe probe, Object result); - - /** - * Receive notification that a program location's execution has just thrown an exception. - *

        - * Synchronous: Truffle execution waits until the call returns. - */ - void returnExceptional(Probe probe, Exception exception); -} diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/SimpleInstrumentListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/SimpleInstrumentListener.java Fri Apr 10 21:00:26 2015 -0700 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.truffle.api.instrument; + +import com.oracle.truffle.api.source.*; + +/** + * A receiver of Truffle execution events that can act on behalf of an external client. + *

        + * The {@link Probe} instance provides access to the {@link SourceSection} associated with the + * event, as well as any {@link SyntaxTag}s that have been applied at that program's location. + *

        + * This is the simplest kind of listener, suitable for clients that need no other information about + * the program's execution state at the time of the event. Clients that require access to the AST + * execution state should use {@link ASTInstrumentListener}. + *

        + * Clients are free, of course, to record additional information in the listener implementation that + * carries additional information about the context and reason for the particular {@link Instrument} + * that is to be created from the listener. + */ +public interface SimpleInstrumentListener { + + /** + * Receive notification that a program location is about to be executed. + *

        + * Synchronous: Truffle execution waits until the call returns. + */ + void enter(Probe probe); + + /** + * Receive notification that a program location's {@code void}-valued execution has just + * completed. + *

        + * Synchronous: Truffle execution waits until the call returns. + */ + void returnVoid(Probe probe); + + /** + * Receive notification that a program location's execution has just completed and returned a + * value (boxed if primitive). + *

        + * Synchronous: Truffle execution waits until the call returns. + */ + void returnValue(Probe probe, Object result); + + /** + * Receive notification that a program location's execution has just thrown an exception. + *

        + * Synchronous: Truffle execution waits until the call returns. + */ + void returnExceptional(Probe probe, Exception exception); +} diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultInstrumentListener.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultInstrumentListener.java Fri Apr 10 17:56:10 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.truffle.api.instrument.impl; - -import com.oracle.truffle.api.instrument.*; - -/** - * A listener for Truffle execution events that provides a no-op implementation of every event. - */ -public class DefaultInstrumentListener implements InstrumentListener { - - public void enter(Probe probe) { - } - - public void returnVoid(Probe probe) { - } - - public void returnValue(Probe probe, Object result) { - } - - public void returnExceptional(Probe probe, Exception exception) { - } -} diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultSimpleInstrumentListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultSimpleInstrumentListener.java Fri Apr 10 21:00:26 2015 -0700 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.truffle.api.instrument.impl; + +import com.oracle.truffle.api.instrument.*; + +/** + * A listener for Truffle execution events that provides a no-op implementation of every event. + */ +public class DefaultSimpleInstrumentListener implements SimpleInstrumentListener { + + public void enter(Probe probe) { + } + + public void returnVoid(Probe probe) { + } + + public void returnValue(Probe probe, Object result) { + } + + public void returnExceptional(Probe probe, Exception exception) { + } +} diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/tools/CoverageTracker.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/tools/CoverageTracker.java Fri Apr 10 17:56:10 2015 -0700 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/tools/CoverageTracker.java Fri Apr 10 21:00:26 2015 -0700 @@ -48,7 +48,7 @@ *

        *

          *
        • "Execution call" on a node is is defined as invocation of a node method that is instrumented - * to produce the event {@link InstrumentListener#enter(Probe)};
        • + * to produce the event {@link SimpleInstrumentListener#enter(Probe)}; *
        • Execution calls are tabulated only at instrumented nodes, i.e. those for which * {@linkplain Node#isInstrumentable() isInstrumentable() == true};
        • *
        • Execution calls are tabulated only at nodes present in the AST when originally created; @@ -226,7 +226,7 @@ * A listener for events at each instrumented AST location. This listener counts * "execution calls" to the instrumented node. */ - private final class CoverageRecord extends DefaultInstrumentListener { + private final class CoverageRecord extends DefaultSimpleInstrumentListener { private final SourceSection srcSection; // The text of the code being counted private Instrument instrument; // The attached Instrument, in case need to remove. diff -r 0f3d81231ecb -r 73b1844b5b14 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLInstrumentTestRunner.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLInstrumentTestRunner.java Fri Apr 10 17:56:10 2015 -0700 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLInstrumentTestRunner.java Fri Apr 10 21:00:26 2015 -0700 @@ -274,7 +274,7 @@ * attached at {@link SLWriteLocalVariableNode}, but provides no guards to protect it from being * attached elsewhere. */ - public final class SLPrintAssigmentValueListener extends DefaultInstrumentListener { + public final class SLPrintAssigmentValueListener extends DefaultSimpleInstrumentListener { private PrintStream output;