Mercurial > hg > truffle
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Probe.java @ 16857:7bfbad29d331
Truffle/Instrumentation: Javadoc cleanups and minor corrections.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Mon, 18 Aug 2014 21:03:41 -0700 |
parents | 7833417c8172 |
children | c4f374adce13 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Probe.java Mon Aug 18 14:36:12 2014 -0700 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Probe.java Mon Aug 18 21:03:41 2014 -0700 @@ -45,9 +45,6 @@ * attached instruments seldom changes. The assumption is invalidated when instruments are added or * removed, but some instruments may change their internal state in such a way that the assumption * should also be invalidated. - * <p> - * <strong>Disclaimer:</strong> experimental interface under development. In particular, the - * <em>notify</em> methods must be migrated to another interface. * * @see Instrument * @see Wrapper @@ -55,27 +52,34 @@ public interface Probe extends ExecutionEvents, SyntaxTagged { /** - * Get the {@link SourceSection} associated with this probe. This is no longer uniquely - * associated. + * Get the {@link SourceSection} in some Truffle AST associated with this probe. * * @return The source associated with this probe. */ SourceSection getSourceLocation(); /** - * Mark this probe as being associated with an AST node in some category useful for debugging - * and other tools. + * Mark this probe as belonging to some tool-related category that can be used to guide tool + * behavior at an associated AST node. For example, a debugger might add the tag + * {@link StandardSyntaxTag#STATEMENT} as a way of configuring where execution should stop when + * stepping. */ void tagAs(SyntaxTag tag); /** - * Adds an instrument to this probe. + * Adds an {@link Instrument} to this probe's collection. No check is made to see if the same + * instrument has already been added. + * + * @param newInstrument The instrument to add to this probe. */ void addInstrument(Instrument newInstrument); /** - * Removes an instrument from this probe. + * Removes the given instrument from the probe's collection. + * + * @param oldInstrument The instrument to remove from this probe. + * @throws RuntimeException if no matching instrument has been attached. */ - void removeInstrument(Instrument oldInstrument); + void removeInstrument(Instrument oldInstrument) throws RuntimeException; }