Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/tools/CoverageTracker.java @ 19186:3d2296dbace9
Truffle/Instrumentation: TruffleTool renamed to InstrumentationTool (the base class for a group of tools that collect information during program execution)
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Sun, 08 Feb 2015 20:05:40 -0800 |
parents | ac114ad31cdd |
children | c5b20395a8bf |
comparison
equal
deleted
inserted
replaced
19185:98967b613c88 | 19186:3d2296dbace9 |
---|---|
36 import com.oracle.truffle.api.nodes.*; | 36 import com.oracle.truffle.api.nodes.*; |
37 import com.oracle.truffle.api.nodes.Node.Child; | 37 import com.oracle.truffle.api.nodes.Node.Child; |
38 import com.oracle.truffle.api.source.*; | 38 import com.oracle.truffle.api.source.*; |
39 | 39 |
40 /** | 40 /** |
41 * A {@link TruffleTool} that counts interpreter <em>execution calls</em> to AST nodes that hold a | 41 * A {@link InstrumentationTool} that counts interpreter <em>execution calls</em> to AST nodes that hold a |
42 * specified {@linkplain SyntaxTag tag}, tabulated by source and line number associated with each | 42 * specified {@linkplain SyntaxTag tag}, tabulated by source and line number associated with each |
43 * node. Tags are presumed to be applied external to the tool. If no tag is specified, | 43 * node. Tags are presumed to be applied external to the tool. If no tag is specified, |
44 * {@linkplain StandardSyntaxTag#STATEMENT STATEMENT} is used, corresponding to conventional | 44 * {@linkplain StandardSyntaxTag#STATEMENT STATEMENT} is used, corresponding to conventional |
45 * behavior for code coverage tools. | 45 * behavior for code coverage tools. |
46 * <p> | 46 * <p> |
47 * <b>Tool Life Cycle</b> | 47 * <b>Tool Life Cycle</b> |
48 * <p> | 48 * <p> |
49 * See {@link TruffleTool} for the life cycle common to all such tools. | 49 * See {@link InstrumentationTool} for the life cycle common to all such tools. |
50 * <p> | 50 * <p> |
51 * <b>Execution Counts</b> | 51 * <b>Execution Counts</b> |
52 * <p> | 52 * <p> |
53 * <ul> | 53 * <ul> |
54 * <li>"Execution call" on a node is is defined as invocation of a node method that is instrumented | 54 * <li>"Execution call" on a node is is defined as invocation of a node method that is instrumented |
70 * </p> | 70 * </p> |
71 * | 71 * |
72 * @see Instrument | 72 * @see Instrument |
73 * @see SyntaxTag | 73 * @see SyntaxTag |
74 */ | 74 */ |
75 public final class CoverageTracker extends TruffleTool { | 75 public final class CoverageTracker extends InstrumentationTool { |
76 | 76 |
77 /** Counting data. */ | 77 /** Counting data. */ |
78 private final Map<LineLocation, CoverageCounter> counters = new HashMap<>(); | 78 private final Map<LineLocation, CoverageCounter> counters = new HashMap<>(); |
79 | 79 |
80 /** For disposal. */ | 80 /** For disposal. */ |